[Bf-blender-cvs] [ef950d6] master: Fix T45502: Crash showing thumbnails

Campbell Barton noreply at git.blender.org
Tue Jul 21 02:08:30 CEST 2015


Commit: ef950d69371e062d29b8f46f351171e89b5f4835
Author: Campbell Barton
Date:   Tue Jul 21 10:01:42 2015 +1000
Branches: master
https://developer.blender.org/rBef950d69371e062d29b8f46f351171e89b5f4835

Fix T45502: Crash showing thumbnails

===================================================================

M	source/blender/imbuf/intern/thumbs.c

===================================================================

diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c
index 09e7d04..1fb6c76 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;
 }




More information about the Bf-blender-cvs mailing list