diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-07-10 12:41:59 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-07-10 12:42:57 +0300 |
commit | 97f2f211ed849ff39b9aae2f1256acfd9e31097d (patch) | |
tree | 4ce61e492176050567650ee75e203e12dc3e644e /source/blender/blenloader | |
parent | c236c80de43245c001ac09ae8d2f067caa929a8a (diff) |
Fix T55772: Crashes opening a file
Bad handling of some weird 'temp' screens in 2.8 doversion.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 11 |
1 files changed, 11 insertions, 0 deletions
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); |