[Bf-blender-cvs] [0095f4f8346] blender2.8: Fix T51794: Crash on hair file when opening with no UI
Julian Eisel
noreply at git.blender.org
Tue Jun 13 23:40:01 CEST 2017
Commit: 0095f4f83465bc9fdc13b79d2126f5623e291d7c
Author: Julian Eisel
Date: Tue Jun 13 23:37:37 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB0095f4f83465bc9fdc13b79d2126f5623e291d7c
Fix T51794: Crash on hair file when opening with no UI
Just a workaround for now.
===================================================================
M source/blender/blenkernel/intern/blendfile.c
===================================================================
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();
More information about the Bf-blender-cvs
mailing list