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:
-rw-r--r--source/blender/blenkernel/intern/blendfile.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c
index 9e244246e16..111dc98476f 100644
--- a/source/blender/blenkernel/intern/blendfile.c
+++ b/source/blender/blenkernel/intern/blendfile.c
@@ -332,7 +332,17 @@ static void setup_app_data(
}
}
}
- BKE_scene_set_background(G.main, curscene);
+
+ if (mode == LOAD_UI_OFF && BLI_listbase_is_empty(&G.main->wm)) {
+ /* XXX prevent crash in pdInitEffectors called through DEG_scene_relations_rebuild (see T51794).
+ * Can be removed once BKE_scene_layer_context_active_ex gets workspace passed. */
+ BLI_addhead(&G.main->wm, CTX_wm_manager(C));
+ BKE_scene_set_background(G.main, curscene);
+ BLI_listbase_clear(&G.main->wm);
+ }
+ else {
+ BKE_scene_set_background(G.main, curscene);
+ }
if (mode != LOAD_UNDO) {
RE_FreeAllPersistentData();