Fix T44217: Crash when starting .blend without "Load UI" enabled
Caused by changes in 31e26bb83b
. This makes it fall back to the old
method if we can't find a screen.
Patch is actually by @LazyDodo with minor edits by me.
This commit is contained in:
parent
f1494edf78
commit
4b847595ee
Notes:
blender-bot
2023-02-14 09:17:57 +01:00
Referenced by issue #44217, Blender crashes opening a .blend file with double click or dragging and dropping it on to the executable
|
@ -283,7 +283,10 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
|
|||
|
||||
/* clear_global will free G.main, here we can still restore pointers */
|
||||
blo_lib_link_screen_restore(bfd->main, curscreen, curscene);
|
||||
curscene = curscreen->scene;
|
||||
/* curscreen might not be set when loading without ui (see T44217) so only re-assign if available */
|
||||
if (curscreen) {
|
||||
curscene = curscreen->scene;
|
||||
}
|
||||
|
||||
if (track_undo_scene) {
|
||||
wmWindowManager *wm = bfd->main->wm.first;
|
||||
|
|
Loading…
Reference in New Issue