diff options
Diffstat (limited to 'source/blender/imbuf/intern/thumbs.c')
-rw-r--r-- | source/blender/imbuf/intern/thumbs.c | 6 |
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); |