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:
authorBastien Montagne <montagne29@wanadoo.fr>2017-11-06 17:16:40 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-11-06 17:16:40 +0300
commitb28da9dbf81581454ecda8197f4b23574e495729 (patch)
treeb69fea7e003f4ce7d00ffdfa0b440d2ebad844da /source/blender/windowmanager/intern/wm_files_link.c
parent8a72be7697f8fbfc8cb6cc9f3df049104e41d4a6 (diff)
Fix T53250: Crash when linking/appending a scene to a blend when another linked scene in this blend is currently open/active.
Inner DAG code would not check against NULL pointer, and in case of an active linked scene, scene pointer will be NULL here, so we have to check it ourself. ;)
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files_link.c')
-rw-r--r--source/blender/windowmanager/intern/wm_files_link.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index 7e6c6160b84..ad71ce1aad9 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -446,7 +446,9 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, false);
/* recreate dependency graph to include new objects */
- DAG_scene_relations_rebuild(bmain, scene);
+ if (scene) {
+ DAG_scene_relations_rebuild(bmain, scene);
+ }
/* free gpu materials, some materials depend on existing objects, such as lamps so freeing correctly refreshes */
GPU_materials_free();