diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-20 16:00:09 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-20 16:00:09 +0300 |
commit | 84a87bf45a21d758f5c5c6c31ee259cecb95209e (patch) | |
tree | 8fbf93606ed1e65a39cd5a881f5837b417fb1a90 /source/blender/blenkernel | |
parent | b7d0cfaa60cc2f143a411d13739b18c75da4ccbb (diff) |
Depsgraph: Fix crashes when OCIO configuration is missing
We were creating copy on write version of scene prior to validating color management
settings for the original scene.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/blendfile.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c index 6ac41c72815..4de2433a89a 100644 --- a/source/blender/blenkernel/intern/blendfile.c +++ b/source/blender/blenkernel/intern/blendfile.c @@ -332,11 +332,20 @@ static void setup_app_data( } } } + + /* Setting scene might require having a dependency graph, with copy on write + * we need to make sure we ensure scene has correct color management before + * constructing dependency graph. + */ + if (mode != LOAD_UNDO) { + IMB_colormanagement_check_file_config(G.main); + } + BKE_scene_set_background(G.main, curscene); if (mode != LOAD_UNDO) { + /* TODO(sergey): Can this be also move above? */ RE_FreeAllPersistentData(); - IMB_colormanagement_check_file_config(G.main); } MEM_freeN(bfd); |