[Bf-blender-cvs] [4b84759] master: Fix T44217: Crash when starting .blend without "Load UI" enabled

Julian Eisel noreply at git.blender.org
Thu Apr 2 00:25:36 CEST 2015


Commit: 4b847595eebc42828ecb87d198bf7c2c7bce7372
Author: Julian Eisel
Date:   Thu Apr 2 00:24:58 2015 +0200
Branches: master
https://developer.blender.org/rB4b847595eebc42828ecb87d198bf7c2c7bce7372

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.

===================================================================

M	source/blender/blenkernel/intern/blender.c

===================================================================

diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index c7b3065..8106f27 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;




More information about the Bf-blender-cvs mailing list