mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[cpp] Return error when default skin can not be parsed in SkeletonBinary.
This commit is contained in:
parent
01fb564358
commit
d344c148ae
@ -274,6 +274,12 @@ SkeletonData *SkeletonBinary::readSkeletonData(const unsigned char *binary, cons
|
||||
skeletonData->_skins.add(defaultSkin);
|
||||
}
|
||||
|
||||
if (!this->getError().isEmpty()) {
|
||||
delete input;
|
||||
delete skeletonData;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Skins. */
|
||||
for (size_t i = 0, n = (size_t) readVarint(input, true); i < n; ++i) {
|
||||
Skin *skin = readSkin(input, false, skeletonData, nonessential);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user