From a5a26e77535ccef73aa3b01c183fe8ae81022dc6 Mon Sep 17 00:00:00 2001 From: "david.elahee@gmail.com" Date: Wed, 26 Feb 2014 12:06:18 +0100 Subject: [PATCH] fixed a recurring NPE when loading swf with dependencies --- project/src/common/ExternalInterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project/src/common/ExternalInterface.cpp b/project/src/common/ExternalInterface.cpp index 6d1ef17ad..9dd491928 100644 --- a/project/src/common/ExternalInterface.cpp +++ b/project/src/common/ExternalInterface.cpp @@ -3234,10 +3234,11 @@ value lime_bitmap_data_from_bytes(value inRGBBytes, value inAlphaBytes) return alloc_null(); Surface *surface = Surface::LoadFromBytes(bytes.data,bytes.length); - surface->SetAllowTrans(true); + if (surface) { + surface->SetAllowTrans(true); if (!val_is_null(inAlphaBytes)) { ByteData alphabytes;