[c] Need to dispose mixingFrom explicitely in spAnimationState_disposeTracks, instead of disposeTrack. A mixingFrom entry may be smoked as part of disposing its parent before an event for the mixing from entry is processed in the event queue.

This commit is contained in:
badlogic 2016-11-28 15:08:17 +01:00
parent da0578ae64
commit f63e1625ab

View File

@ -175,7 +175,6 @@ void _spEventQueue_drain (_spEventQueue* self) {
}
void _spAnimationState_disposeTrackEntry (spTrackEntry* entry) {
if (entry->mixingFrom) _spAnimationState_disposeTrackEntry(entry->mixingFrom);
FREE(entry->timelinesFirst);
FREE(entry->timelinesRotation);
FREE(entry);
@ -185,6 +184,12 @@ void _spAnimationState_disposeTrackEntries (spAnimationState* state, spTrackEntr
while (entry) {
spTrackEntry* next = entry->next;
_spAnimationState_disposeTrackEntry(entry);
spTrackEntry* from = entry->mixingFrom;
while (from) {
spTrackEntry* nextFrom = from->mixingFrom;
_spAnimationState_disposeTrackEntry(from);
from = nextFrom;
}
entry = next;
}
}