From d8c449b2dcc4085c57fa23b2fd6a5bfa584c46bb Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 6 Sep 2017 09:02:22 +0800 Subject: [PATCH] [spine] Cherry-pick https://github.com/EsotericSoftware/spine-runtimes/commit/a4a97969e8916be7d6ba531707b662ebbad8da9b --- native/cocos/editor-support/spine/AnimationState.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/native/cocos/editor-support/spine/AnimationState.c b/native/cocos/editor-support/spine/AnimationState.c index 578fe718f3..aac484d164 100644 --- a/native/cocos/editor-support/spine/AnimationState.c +++ b/native/cocos/editor-support/spine/AnimationState.c @@ -186,9 +186,13 @@ void _spAnimationState_disposeTrackEntries (spAnimationState* state, spTrackEntr spTrackEntry* from = entry->mixingFrom; while (from) { spTrackEntry* nextFrom = from->mixingFrom; + if (entry->listener) entry->listener(state, SP_ANIMATION_DISPOSE, from, 0); + if (state->listener) state->listener(state, SP_ANIMATION_DISPOSE, from, 0); _spAnimationState_disposeTrackEntry(from); from = nextFrom; } + if (entry->listener) entry->listener(state, SP_ANIMATION_DISPOSE, entry, 0); + if (state->listener) state->listener(state, SP_ANIMATION_DISPOSE, entry, 0); _spAnimationState_disposeTrackEntry(entry); entry = next; }