diff --git a/spine-c/src/spine/Atlas.c b/spine-c/src/spine/Atlas.c index f202c5dac..20dd5d349 100644 --- a/spine-c/src/spine/Atlas.c +++ b/spine-c/src/spine/Atlas.c @@ -120,7 +120,7 @@ static int readValue (const char* end, Str* str) { /* Returns the number of tuple values read (1, 2, 4, or 0 for failure). */ static int readTuple (const char* end, Str tuple[]) { int i; - Str str; + Str str = {NULL, NULL}; readLine(0, end, &str); if (!beginPast(&str, ':')) return 0; diff --git a/spine-sfml/src/spine/spine-sfml.cpp b/spine-sfml/src/spine/spine-sfml.cpp index 4543ebf84..b5b5b06de 100644 --- a/spine-sfml/src/spine/spine-sfml.cpp +++ b/spine-sfml/src/spine/spine-sfml.cpp @@ -81,8 +81,8 @@ SkeletonDrawable::SkeletonDrawable (SkeletonData* skeletonData, AnimationStateDa SkeletonDrawable::~SkeletonDrawable () { delete vertexArray; FREE(worldVertices); + if (ownsAnimationStateData) AnimationStateData_dispose(state->data); AnimationState_dispose(state); - if (ownsAnimationStateData) AnimationStateData_dispose(state->data); Skeleton_dispose(skeleton); }