[Bf-blender-cvs] [7f4b6a3] master: Fix crash loading file without scene in bg mode

Campbell Barton noreply at git.blender.org
Wed Apr 15 17:46:04 CEST 2015


Commit: 7f4b6a345e59bd4b05c8cab08d0c618eea9f827d
Author: Campbell Barton
Date:   Thu Apr 16 01:45:30 2015 +1000
Branches: master
https://developer.blender.org/rB7f4b6a345e59bd4b05c8cab08d0c618eea9f827d

Fix crash loading file without scene in bg mode

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

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

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

diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 305bf1e..4b2c6ef 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -263,7 +263,7 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
 		/* but use new Scene pointer */
 		curscene = bfd->curscene;
 
-		track_undo_scene = (mode == LOAD_UNDO && curscreen && bfd->main->wm.first);
+		track_undo_scene = (mode == LOAD_UNDO && curscreen && curscene && bfd->main->wm.first);
 
 		if (curscene == NULL) curscene = bfd->main->scene.first;
 		/* empty file, we add a scene to make Blender work */




More information about the Bf-blender-cvs mailing list