From 1cf4071cf793b401e53638201b678f62ff916f0b Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Fri, 24 May 2013 13:38:08 +0200 Subject: [PATCH] Prevent errors if image could not be loaded. --- spine-corona/spine-corona/spine.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-corona/spine-corona/spine.lua b/spine-corona/spine-corona/spine.lua index de9ad4dfe..36c9b684c 100644 --- a/spine-corona/spine-corona/spine.lua +++ b/spine-corona/spine-corona/spine.lua @@ -79,13 +79,13 @@ function spine.Skeleton.new (skeletonData, group) local image = images[slot] if not attachment then -- Attachment is gone, remove the image. - if image then + if image and image ~= spine.Skeleton.failed then image:removeSelf() images[slot] = nil end else -- Attachment image has changed. - if image and image.attachment ~= attachment then + if image and image.attachment ~= attachment and image ~= spine.Skeleton.failed then image:removeSelf() image = nil end