Fix T56020: Crash while opening .blend file made with older version.

We need a NULL workspace check here, in some cases we get a SRTemp
screen even though it's not tagged as temp...
This commit is contained in:
Bastien Montagne 2018-07-30 15:00:51 +02:00
parent 4473427d81
commit 27567a6c76
Notes: blender-bot 2023-02-14 09:24:53 +01:00
Referenced by issue #56020, Crash while opening .blend file made with older version
1 changed files with 3 additions and 0 deletions

View File

@ -112,6 +112,9 @@ static void do_version_workspaces_create_from_screens(Main *bmain)
else {
workspace = BKE_workspace_add(bmain, screen->id.name + 2);
}
if (workspace == NULL) {
continue; /* Not much we can do.. */
}
BKE_workspace_layout_add(bmain, workspace, screen, screen->id.name + 2);
}
}