diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-04 09:23:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-04 09:23:36 +0400 |
commit | 0e0eba9f79b122eeef613fbd3733b339a95094a4 (patch) | |
tree | 494f44c1d81d1c9545b6440165c6eb94d2fa1bd4 /source/blender/windowmanager | |
parent | d29d3a89e48fa709a3d683a88874ff8a4c68945a (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.c | 5 |
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 */ |