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>2011-07-04 09:23:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-07-04 09:23:36 +0400
commit0e0eba9f79b122eeef613fbd3733b339a95094a4 (patch)
tree494f44c1d81d1c9545b6440165c6eb94d2fa1bd4 /source/blender/windowmanager
parentd29d3a89e48fa709a3d683a88874ff8a4c68945a (diff)
fix for crash when setting layers or saving when there is no active scene - only really happens when running python scripts on startup.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index e0cfb86ce05..aabaf6d4055 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -635,8 +635,9 @@ static ImBuf *blend_file_thumb(Scene *scene, int **thumb_pt)
char err_out[256]= "unknown";
*thumb_pt= NULL;
-
- if(G.background || scene->camera==NULL)
+
+ /* scene can be NULL if running a script at startup and calling the save operator */
+ if(G.background || scene==NULL || scene->camera==NULL)
return NULL;
/* gets scaled to BLEN_THUMB_SIZE */