Revert "Fix T51794: Crash on hair file when opening with no UI"

This reverts commit 0095f4f834.
This commit is contained in:
Dalai Felinto 2017-07-14 11:44:26 +02:00
parent b48694639a
commit 78e2238fe4
Notes: blender-bot 2023-02-14 10:29:32 +01:00
Referenced by issue #51794, Workspace: Crash on hair file when opening with no UI
1 changed files with 1 additions and 12 deletions

View File

@ -332,18 +332,7 @@ static void setup_app_data(
}
}
}
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_PLACEHOLDER gets
* replaced by BKE_scene_layer_from_workspace_get. */
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);
}
BKE_scene_set_background(G.main, curscene);
if (mode != LOAD_UNDO) {
RE_FreeAllPersistentData();