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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-08 16:55:31 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-08 16:55:31 +0300
commitec7df03c867d28316708e9b91bec5cef0aee832e (patch)
tree3f560939b745032e235d9ac789c4117d669d6462 /source/blender/imbuf/intern/thumbs.c
parent4c318539b2f6abdf8f2a02376b6fcb8d30a4b12e (diff)
Warning fixes, one actual bug found in sequencer sound wave drawing. Also
changed some malloc to MEM_mallocN while trying to track down a memory leak.
Diffstat (limited to 'source/blender/imbuf/intern/thumbs.c')
-rw-r--r--source/blender/imbuf/intern/thumbs.c8
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;