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. ;)
This commit is contained in:
parent
8a72be7697
commit
b28da9dbf8
Notes:
blender-bot
2024-04-29 13:07:32 +02:00
Referenced by issue #53683, 2.79a release Referenced by issue #53250, Crash when linking/appending a scene to a blend when another linked scene in this blend is currently open/active
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue