Possible fix for Torric's gesture toggle crash

This commit is contained in:
Lirusaito
2019-05-27 06:25:29 -04:00
parent f6d8573221
commit 2e5141bd25

View File

@@ -1207,6 +1207,8 @@ void LLGestureMgr::stopGesture(LLMultiGesture* gesture)
{ {
gAgent.sendAnimationRequest(anim_id, ANIM_REQUEST_STOP); gAgent.sendAnimationRequest(anim_id, ANIM_REQUEST_STOP);
} }
gesture->mRequestedAnimIDs.clear();
for (const auto& anim_id : gesture->mPlayingAnimIDs) for (const auto& anim_id : gesture->mPlayingAnimIDs)
{ {
if (gesture->mLocal) if (gesture->mLocal)
@@ -1214,6 +1216,7 @@ void LLGestureMgr::stopGesture(LLMultiGesture* gesture)
else else
gAgent.sendAnimationRequest(anim_id, ANIM_REQUEST_STOP); gAgent.sendAnimationRequest(anim_id, ANIM_REQUEST_STOP);
} }
gesture->mPlayingAnimIDs.clear();
mPlaying.erase(std::remove(mPlaying.begin(), mPlaying.end(), gesture), mPlaying.end()); mPlaying.erase(std::remove(mPlaying.begin(), mPlaying.end(), gesture), mPlaying.end());