[Bf-blender-cvs] [b28da9dbf81] master: Fix T53250: Crash when linking/appending a scene to a blend when another linked scene in this blend is currently open/active.

Bastien Montagne noreply at git.blender.org
Mon Nov 6 15:18:19 CET 2017


Commit: b28da9dbf81581454ecda8197f4b23574e495729
Author: Bastien Montagne
Date:   Mon Nov 6 15:16:40 2017 +0100
Branches: master
https://developer.blender.org/rBb28da9dbf81581454ecda8197f4b23574e495729

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. ;)

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

M	source/blender/windowmanager/intern/wm_files_link.c

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

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();



More information about the Bf-blender-cvs mailing list