From 821c9ea38b36fb563c544e02ac49398394bf83cc Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Sat, 28 Sep 2013 01:37:08 +0200 Subject: [PATCH] Fixed crash from freeing previous twice. --- spine-c/src/spine/AnimationState.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spine-c/src/spine/AnimationState.c b/spine-c/src/spine/AnimationState.c index 2ed13e0b0..50076935b 100644 --- a/spine-c/src/spine/AnimationState.c +++ b/spine-c/src/spine/AnimationState.c @@ -171,7 +171,10 @@ void AnimationState_clearTrack (AnimationState* self, int trackIndex) { self->tracks[trackIndex] = 0; _TrackEntry_disposeAll(current); - if (current->previous) _TrackEntry_dispose(current->previous); + if (current->previous) { + _TrackEntry_dispose(current->previous); + current->previous = 0; + } } TrackEntry* _AnimationState_expandToIndex (AnimationState* self, int index) {