diff options
Diffstat (limited to 'source/blender/imbuf/intern/thumbs.c')
-rw-r--r-- | source/blender/imbuf/intern/thumbs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 6053c5556f1..4e6230a0109 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -289,19 +289,19 @@ ImBuf* IMB_thumb_create(const char* dir, const char* file, ThumbSize size, Thumb } else { if (THB_SOURCE_IMAGE == source) { BLI_getwdN(wdir); - chdir(dir); + if(chdir(dir) != 0) return 0; img = IMB_loadiffname(file, IB_rect | IB_imginfo); if (img != NULL) { stat(file, &info); sprintf(mtime, "%ld", info.st_mtime); sprintf(cwidth, "%d", img->x); sprintf(cheight, "%d", img->y); - chdir(wdir); } + if(chdir(wdir) != 0) /* unlikely to happen, just silence warning */; } else if (THB_SOURCE_MOVIE == source) { struct anim * anim = NULL; BLI_getwdN(wdir); - chdir(dir); + if(chdir(dir) != 0) return 0; anim = IMB_open_anim(file, IB_rect | IB_imginfo); if (anim != NULL) { img = IMB_anim_absolute(anim, 0); @@ -315,7 +315,7 @@ ImBuf* IMB_thumb_create(const char* dir, const char* file, ThumbSize size, Thumb } stat(file, &info); sprintf(mtime, "%ld", info.st_mtime); - chdir(wdir); + if(chdir(wdir) != 0) /* unlikely to happen, just silence warning */; } if (!img) return 0; |