[Bf-blender-cvs] [7c59441] master: Fix T44995: Crash loading packed image

Campbell Barton noreply at git.blender.org
Mon Jun 8 10:22:29 CEST 2015


Commit: 7c5944137e8bbb7a52b2fa227fc49c62ac5a5edc
Author: Campbell Barton
Date:   Mon Jun 8 18:21:27 2015 +1000
Branches: master
https://developer.blender.org/rB7c5944137e8bbb7a52b2fa227fc49c62ac5a5edc

Fix T44995: Crash loading packed image

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

M	source/blender/blenkernel/intern/image.c

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

diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index a8c5620..09934c8 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -3394,9 +3394,11 @@ static ImBuf *load_image_single(
 		flag |= imbuf_alpha_flags_for_image(ima);
 
 		imapf = BLI_findlink(&ima->packedfiles, view_id);
-		ibuf = IMB_ibImageFromMemory(
-		       (unsigned char *)imapf->packedfile->data, imapf->packedfile->size, flag,
-		       ima->colorspace_settings.name, "<packed data>");
+		if (imapf->packedfile) {
+			ibuf = IMB_ibImageFromMemory(
+			       (unsigned char *)imapf->packedfile->data, imapf->packedfile->size, flag,
+			       ima->colorspace_settings.name, "<packed data>");
+		}
 	}
 	else {
 		ImageUser iuser_t;




More information about the Bf-blender-cvs mailing list