[Bf-blender-cvs] [97f2f211ed8] blender2.8: Fix T55772: Crashes opening a file
Bastien Montagne
noreply at git.blender.org
Tue Jul 10 11:43:28 CEST 2018
Commit: 97f2f211ed849ff39b9aae2f1256acfd9e31097d
Author: Bastien Montagne
Date: Tue Jul 10 11:41:59 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB97f2f211ed849ff39b9aae2f1256acfd9e31097d
Fix T55772: Crashes opening a file
Bad handling of some weird 'temp' screens in 2.8 doversion.
===================================================================
M source/blender/blenloader/intern/versioning_280.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 3bdd4db3b94..5e27d72caa2 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -164,7 +164,18 @@ static void do_version_workspaces_after_lib_link(Main *bmain)
for (wmWindow *win = wm->windows.first; win; win = win->next) {
bScreen *screen_parent = screen_parent_find(win->screen);
bScreen *screen = screen_parent ? screen_parent : win->screen;
+
+ if (screen->temp) {
+ /* We do not generate a new workspace for those screens... still need to set some data in win. */
+ win->workspace_hook = BKE_workspace_instance_hook_create(bmain);
+ win->scene = screen->scene;
+ /* Deprecated from now on! */
+ win->screen = NULL;
+ continue;
+ }
+
WorkSpace *workspace = BLI_findstring(&bmain->workspaces, screen->id.name + 2, offsetof(ID, name) + 2);
+ BLI_assert(workspace != NULL);
ListBase *layouts = BKE_workspace_layouts_get(workspace);
win->workspace_hook = BKE_workspace_instance_hook_create(bmain);
More information about the Bf-blender-cvs
mailing list