diff options
author | Julian Eisel <julian@linux-chl2.site> | 2015-04-02 01:24:58 +0300 |
---|---|---|
committer | Julian Eisel <julian@linux-chl2.site> | 2015-04-02 01:24:58 +0300 |
commit | 4b847595eebc42828ecb87d198bf7c2c7bce7372 (patch) | |
tree | 5ab3e893c5193141fa4f599a7683b20f88e6ef62 | |
parent | f1494edf787099d9261f7ab82a66c68ffbe8e727 (diff) |
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.
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index c7b306521c4..8106f27253b 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -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; |