[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50574] branches/soc-2011-tomato/source/ blender/imbuf/intern/colormanagement.c: Color Management: fix segfault when configuration file is missing

Sergey Sharybin sergey.vfx at gmail.com
Thu Sep 13 15:08:31 CEST 2012


Revision: 50574
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50574
Author:   nazgul
Date:     2012-09-13 13:08:31 +0000 (Thu, 13 Sep 2012)
Log Message:
-----------
Color Management: fix segfault when configuration file is missing

Also don't try to load configuration file from environment variable if
it contains empty string.

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-13 11:13:13 UTC (rev 50573)
+++ branches/soc-2011-tomato/source/blender/imbuf/intern/colormanagement.c	2012-09-13 13:08:31 UTC (rev 50574)
@@ -573,7 +573,7 @@
 
 	ocio_env = getenv("OCIO");
 
-	if (ocio_env)
+	if (ocio_env && ocio_env[0] != '\0')
 		config = OCIO_configCreateFromEnv();
 
 	if (config == NULL) {
@@ -590,9 +590,9 @@
 		OCIO_setCurrentConfig(config);
 
 		colormanage_load_config(config);
+
+		OCIO_configRelease(config);
 	}
-
-	OCIO_configRelease(config);
 #endif
 
 	BLI_init_srgb_conversion();




More information about the Bf-blender-cvs mailing list