diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-31 18:56:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-31 18:56:14 +0400 |
commit | 41a49a6bc92680cc97872ddf72420756e6ea06c8 (patch) | |
tree | 45d6ef79e427d36561bee1ece24e21b35c1104d3 /source/blender/blenkernel/intern/blender.c | |
parent | a51f31e9a55c458fda041eddbb2dcad9e0527d22 (diff) |
simple NULL check to fix a crash when running in background mode
Diffstat (limited to 'source/blender/blenkernel/intern/blender.c')
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 052c1851343..d120b42a286 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -231,7 +231,7 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, char *filename) curscene= bfd->curscene; if(curscene==NULL) curscene= bfd->main->scene.first; /* and we enforce curscene to be in current screen */ - curscreen->scene= curscene; + if(curscreen) curscreen->scene= curscene; /* can run in bgmode */ /* clear_global will free G.main, here we can still restore pointers */ lib_link_screen_restore(bfd->main, curscreen, curscene); |