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