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:
authorCampbell Barton <ideasman42@gmail.com>2015-10-17 08:14:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-10-17 08:16:08 +0300
commit88767a193980ff10ac4c5c4241d7c089823294a9 (patch)
tree61d36bf53aa98735942bf80f5f969f32c66c8b22
parenteb49a76dcaa18ef6bf2667b3671913ca9ccf31e7 (diff)
IMB_thumbs: add missing error check
-rw-r--r--source/blender/imbuf/intern/thumbs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c
index 4e1b5c66c84..95d061bcb75 100644
--- a/source/blender/imbuf/intern/thumbs.c
+++ b/source/blender/imbuf/intern/thumbs.c
@@ -217,7 +217,7 @@ static bool thumbhash_from_path(const char *UNUSED(path), ThumbSource source, ch
}
}
-static int uri_from_filename(const char *path, char *uri)
+static bool uri_from_filename(const char *path, char *uri)
{
char orig_uri[URI_MAX];
const char *dirstart = path;
@@ -482,7 +482,9 @@ ImBuf *IMB_thumb_create(const char *path, ThumbSize size, ThumbSource source, Im
char uri[URI_MAX] = "";
char thumb_name[40];
- uri_from_filename(path, uri);
+ if (!uri_from_filename(path, uri)) {
+ return NULL;
+ }
thumbname_from_uri(uri, thumb_name, sizeof(thumb_name));
return thumb_create_ex(path, uri, thumb_name, false, THUMB_DEFAULT_HASH, NULL, NULL, size, source, img);