[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50427] branches/soc-2011-tomato/source/ blender/imbuf/intern/colormanagement.c: Color Management: fix for dereferencing NULL pointer
Sergey Sharybin
sergey.vfx at gmail.com
Wed Sep 5 18:29:17 CEST 2012
Revision: 50427
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50427
Author: nazgul
Date: 2012-09-05 16:29:16 +0000 (Wed, 05 Sep 2012)
Log Message:
-----------
Color Management: fix for dereferencing NULL pointer
Modified Paths:
--------------
branches/soc-2011-tomato/source/blender/imbuf/intern/colormanagement.c
Modified: branches/soc-2011-tomato/source/blender/imbuf/intern/colormanagement.c
===================================================================
--- branches/soc-2011-tomato/source/blender/imbuf/intern/colormanagement.c 2012-09-05 16:24:33 UTC (rev 50426)
+++ branches/soc-2011-tomato/source/blender/imbuf/intern/colormanagement.c 2012-09-05 16:29:16 UTC (rev 50427)
@@ -318,6 +318,8 @@
ImBuf *cache_ibuf;
int view_flag = 1 << (view_settings->view - 1);
int predivide = ibuf->flags & IB_cm_predivide;
+ CurveMapping *curve_mapping = view_settings->curve_mapping;
+ int curve_mapping_timestamp = curve_mapping ? curve_mapping->changed_timestamp : 0;
colormanage_settings_to_key(&key, view_settings, display_settings);
@@ -348,8 +350,8 @@
cache_data->gamma != view_settings->gamma ||
cache_data->predivide != predivide ||
cache_data->flag != view_settings->flag ||
- cache_data->curve_mapping != view_settings->curve_mapping ||
- cache_data->curve_mapping_timestamp != view_settings->curve_mapping->changed_timestamp)
+ cache_data->curve_mapping != curve_mapping ||
+ cache_data->curve_mapping_timestamp != curve_mapping_timestamp)
{
*cache_handle = NULL;
@@ -374,6 +376,8 @@
int view_flag = 1 << (view_settings->view - 1);
int predivide = ibuf->flags & IB_cm_predivide;
struct MovieCache *moviecache = colormanage_moviecache_ensure(ibuf);
+ CurveMapping *curve_mapping = view_settings->curve_mapping;
+ int curve_mapping_timestamp = curve_mapping ? curve_mapping->changed_timestamp : 0;
colormanage_settings_to_key(&key, view_settings, display_settings);
@@ -393,8 +397,8 @@
cache_data->gamma = view_settings->gamma;
cache_data->predivide = predivide;
cache_data->flag = view_settings->flag;
- cache_data->curve_mapping = view_settings->curve_mapping;
- cache_data->curve_mapping_timestamp = view_settings->curve_mapping->changed_timestamp;
+ cache_data->curve_mapping = curve_mapping;
+ cache_data->curve_mapping_timestamp = curve_mapping_timestamp;
colormanage_cachedata_set(cache_ibuf, cache_data);
More information about the Bf-blender-cvs
mailing list