mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
prevent a crash when a skin has no attachments. (#2114)
This commit is contained in:
parent
3cdfb25a48
commit
85af0f6580
@ -508,9 +508,9 @@ SkeletonData *SkeletonJson::readSkeletonData(const char *json) {
|
||||
skeletonData->_defaultSkin = skin;
|
||||
}
|
||||
|
||||
for (attachmentsMap = Json::getItem(skinMap,
|
||||
"attachments")
|
||||
->_child;
|
||||
Json *attachments = Json::getItem(skinMap, "attachments");
|
||||
if (attachments)
|
||||
for (attachmentsMap = attachments->_child;
|
||||
attachmentsMap; attachmentsMap = attachmentsMap->_next) {
|
||||
SlotData *slot = skeletonData->findSlot(attachmentsMap->_name);
|
||||
Json *attachmentMap;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user