Fix crash loading file without scene in bg mode

This commit is contained in:
Campbell Barton 2015-04-16 01:45:30 +10:00
parent 99299da4b5
commit 7f4b6a345e
1 changed files with 1 additions and 1 deletions

View File

@ -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 */