Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
bofeng-song committed Dec 13, 2024
1 parent 545ce6d commit 939895c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions native/cocos/editor-support/spine-wasm/spine-wasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ namespace {
auto* regionAttachment = static_cast<RegionAttachment *>(attachment);
attachmentVertices = static_cast<AttachmentVertices*>(regionAttachment->getRendererObject());
}
auto& textureName = attachmentVertices->_textureId;
if (textureMap.containsKey(textureName)) {
attachmentVertices->_textureId = textureMap[textureName];
} else {
spine::String logInfo(attachment->getName());
logInfo.append(" attachment's texture doesn`t exist ");
logInfo.append(textureName);
logToConsole(logInfo.buffer());
if (attachmentVertices) {
auto& textureName = attachmentVertices->_textureId;
if (textureMap.containsKey(textureName)) {
attachmentVertices->_textureId = textureMap[textureName];
} else {
spine::String logInfo(attachment->getName());
logInfo.append(" attachment's texture doesn`t exist ");
logInfo.append(textureName);
logToConsole(logInfo.buffer());
}
}
}
}
Expand Down

0 comments on commit 939895c

Please sign in to comment.