[Bf-blender-cvs] [1b9cae9] master: Fix T50122: SEGFAULT: OCIO configuration typo leads to segfault

Sergey Sharybin noreply at git.blender.org
Tue Dec 6 14:19:49 CET 2016


Commit: 1b9cae9d04c222d1ce8dc05abbd5692c30fe3e57
Author: Sergey Sharybin
Date:   Tue Dec 6 14:19:17 2016 +0100
Branches: master
https://developer.blender.org/rB1b9cae9d04c222d1ce8dc05abbd5692c30fe3e57

Fix T50122: SEGFAULT: OCIO configuration typo leads to segfault

===================================================================

M	source/blender/imbuf/intern/colormanagement.c

===================================================================

diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index 0134854..a453462 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -1227,7 +1227,12 @@ const char *IMB_colormanagement_get_float_colorspace(ImBuf *ibuf)
 
 const char *IMB_colormanagement_get_rect_colorspace(ImBuf *ibuf)
 {
-	return ibuf->rect_colorspace->name;
+	if (ibuf->rect_colorspace) {
+		return ibuf->rect_colorspace->name;
+	}
+	else {
+		return IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_DEFAULT_BYTE);
+	}
 }
 
 /*********************** Threaded display buffer transform routines *************************/




More information about the Bf-blender-cvs mailing list