Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-09-18 14:11:46 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-09-18 14:11:46 +0400
commit3d9d7275b58ff3ca6215236ff580a2bdb6b65264 (patch)
tree58cc3ed48fd8e09951640db8f980dd8d3608a949 /source/blender/makesrna/intern/rna_color.c
parentc50c654543b5928d29cc841d1bffb709332f9c6c (diff)
Color Management: fixed crash when changing display device in screenshot save operator
In fact, color management settings shouldn't be editing from this operator since screenshot is using OpenGL which is in sRGB space, but fixed issues with Image Format initialization and added NULL pointer checks.
Diffstat (limited to 'source/blender/makesrna/intern/rna_color.c')
-rw-r--r--source/blender/makesrna/intern/rna_color.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 0edcad59577..e7b09506ab4 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -377,6 +377,9 @@ static void rna_ColorManagedDisplaySettings_display_device_update(Main *UNUSED(b
{
ID *id = ptr->id.data;
+ if (!id)
+ return;
+
if (GS(id->name) == ID_SCE) {
Scene *scene = (Scene *) id;
@@ -486,6 +489,9 @@ static void rna_ColorManagement_update(Main *UNUSED(bmain), Scene *UNUSED(scene)
{
ID *id = ptr->id.data;
+ if (!id)
+ return;
+
if (GS(id->name) == ID_SCE) {
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL);
}