فهرست منبع

Fixed crash from freeing previous twice.

NathanSweet 12 سال پیش
والد
کامیت
821c9ea38b
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      spine-c/src/spine/AnimationState.c

+ 4 - 1
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) {