[cpp] Fix unitialized variable

This commit is contained in:
Mario Zechner 2024-04-09 11:21:21 +02:00
parent ff9a6cde8b
commit f1d6515e26
2 changed files with 64 additions and 63 deletions

View File

@ -1164,6 +1164,7 @@ Animation *SkeletonJson::readAnimation(Json *root, SkeletonData *skeletonData) {
timelines.add(readTimeline(timelineMap->_child, timeline, 0, 1));
} else if (strcmp(timelineMap->_name, "inherit") == 0) {
InheritTimeline *timeline = new (__FILE__, __LINE__) InheritTimeline(frames, boneIndex);
Json *keyMap = timelineMap->_child;
for (frame = 0;; frame++) {
float time = Json::getFloat(keyMap, "time", 0);
const char *value = Json::getString(keyMap, "value", "normal");