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:
authorJulian Eisel <eiseljulian@gmail.com>2017-06-14 00:37:37 +0300
committerJulian Eisel <eiseljulian@gmail.com>2017-06-14 00:37:37 +0300
commit0095f4f83465bc9fdc13b79d2126f5623e291d7c (patch)
tree271e524fa33bc6d223e93492a36d58261cf96e48 /source/blender/blenkernel/intern/blendfile.c
parentbe4cf933abfef8c5e8ee02e04a236e414bc11287 (diff)
Fix T51794: Crash on hair file when opening with no UI
Just a workaround for now.
Diffstat (limited to 'source/blender/blenkernel/intern/blendfile.c')
-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();