From b28da9dbf81581454ecda8197f4b23574e495729 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 6 Nov 2017 15:16:40 +0100 Subject: 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. ;) --- source/blender/windowmanager/intern/wm_files_link.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/windowmanager') 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(); -- cgit v1.2.3