mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
Prevent errors if image could not be loaded.
This commit is contained in:
parent
d237ed758b
commit
1cf4071cf7
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user