mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-13 02:28:44 +08:00
[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:
parent
da0578ae64
commit
f63e1625ab
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user