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-07-21 03:01:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-07-21 03:01:42 +0300
commitef950d69371e062d29b8f46f351171e89b5f4835 (patch)
treea313730bbb0699cfbcc9b8252d78dd88cd20b07b /source/blender/imbuf/intern/thumbs.c
parent2bfa95043802a2db80e823fbd4ad21b3892dc0a0 (diff)
Fix T45502: Crash showing thumbnails
Diffstat (limited to 'source/blender/imbuf/intern/thumbs.c')
-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 09e7d044082..1fb6c7631b9 100644
--- a/source/blender/imbuf/intern/thumbs.c
+++ b/source/blender/imbuf/intern/thumbs.c
@@ -611,8 +611,10 @@ ImBuf *IMB_thumb_manage(const char *org_path, ThumbSize size, ThumbSource source
/* Our imbuf **must** have a valid rect (i.e. 8-bits/channels) data, we rely on this in draw code.
* However, in some cases we may end loading 16bits PNGs, which generated float buffers.
* This should be taken care of in generation step, but add also a safeguard here! */
- IMB_rect_from_float(img);
- imb_freerectfloatImBuf(img);
+ if (img) {
+ IMB_rect_from_float(img);
+ imb_freerectfloatImBuf(img);
+ }
return img;
}