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:
authorCampbell Barton <ideasman42@gmail.com>2010-08-31 18:56:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-31 18:56:14 +0400
commit41a49a6bc92680cc97872ddf72420756e6ea06c8 (patch)
tree45d6ef79e427d36561bee1ece24e21b35c1104d3 /source/blender
parenta51f31e9a55c458fda041eddbb2dcad9e0527d22 (diff)
simple NULL check to fix a crash when running in background mode
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/blender.c2
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);