mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 01:06:00 +08:00
[ts][threejs] Skin.attachAll() null check (#2755)
This commit is contained in:
parent
bd1b98fe97
commit
7f2a3fe013
@ -228,13 +228,15 @@ class Skin {
|
||||
var slotAttachment:Attachment = slot.attachment;
|
||||
if (slotAttachment != null && slotIndex < oldSkin.attachments.length) {
|
||||
var dictionary:StringMap<Attachment> = oldSkin.attachments[slotIndex];
|
||||
for (name in dictionary.keys()) {
|
||||
var skinAttachment:Attachment = dictionary.get(name);
|
||||
if (slotAttachment == skinAttachment) {
|
||||
var attachment:Attachment = getAttachment(slotIndex, name);
|
||||
if (attachment != null)
|
||||
slot.attachment = attachment;
|
||||
break;
|
||||
if (null != dictionary) {
|
||||
for (name in dictionary.keys()) {
|
||||
var skinAttachment:Attachment = dictionary.get(name);
|
||||
if (slotAttachment == skinAttachment) {
|
||||
var attachment:Attachment = getAttachment(slotIndex, name);
|
||||
if (attachment != null)
|
||||
slot.attachment = attachment;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user