Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@linux-chl2.site>2015-04-02 01:24:58 +0300
committerJulian Eisel <julian@linux-chl2.site>2015-04-02 01:24:58 +0300
commit4b847595eebc42828ecb87d198bf7c2c7bce7372 (patch)
tree5ab3e893c5193141fa4f599a7683b20f88e6ef62 /source/blender/blenkernel/intern/blender.c
parentf1494edf787099d9261f7ab82a66c68ffbe8e727 (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.
Diffstat (limited to 'source/blender/blenkernel/intern/blender.c')
-rw-r--r--source/blender/blenkernel/intern/blender.c5
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;