diff options
Diffstat (limited to 'source/blender/imbuf/intern/thumbs.c')
-rw-r--r-- | source/blender/imbuf/intern/thumbs.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 234c8837b35..f3415d44ecb 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -29,7 +29,6 @@ #include <stdio.h> -#include "BKE_global.h" #include "BKE_utildefines.h" #include "BLI_blenlib.h" #include "MEM_guardedalloc.h" @@ -243,14 +242,14 @@ void IMB_thumb_makedirs() /* create thumbnail for file and returns new imbuf for thumbnail */ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, ImBuf *img) { - char uri[URI_MAX]; + char uri[URI_MAX]= ""; char desc[URI_MAX+22]; char tpath[FILE_MAX]; char tdir[FILE_MAX]; char temp[FILE_MAX]; - char mtime[40]; - char cwidth[40]; - char cheight[40]; + char mtime[40]= "0"; /* incase we can't stat the file */ + char cwidth[40]= "0"; /* incase images have no data */ + char cheight[40]= "0"; char thumb[40]; short tsize = 128; short ex, ey; @@ -265,7 +264,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im tsize = 256; break; case THB_FAIL: - tsize = 0; + tsize = 1; break; default: return 0; /* unknown size */ @@ -281,7 +280,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im return NULL; } if (size == THB_FAIL) { - img = IMB_allocImBuf(0,0,32, IB_rect | IB_metadata, 0); + img = IMB_allocImBuf(1,1,32, IB_rect | IB_metadata, 0); if (!img) return 0; } else { if (THB_SOURCE_IMAGE == source || THB_SOURCE_BLEND == source) { |