summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatarself.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-11-30 18:09:29 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-11-30 18:09:29 +0200
commitc409236dacc215231e8404133c2613d5ee90c990 (patch)
tree25dfeec08de41090e466412d5ae8f5fe948c6146 /indra/newview/llvoavatarself.cpp
parent683bf84bb38adc88d4a4b7fedaed89b41fcac45e (diff)
parentd2ade35b0914f86b1c0239dbf40f5d5972a11b07 (diff)
Merge branch 'DRTVWR-594-maint-Y' into marchcat/594-y-pbr-merge
# Conflicts: # indra/newview/llinventorygallery.cpp # indra/newview/skins/default/xui/en/notifications.xml
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rw-r--r--indra/newview/llvoavatarself.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 6e5b387b36..34efb39848 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -834,7 +834,11 @@ void LLVOAvatarSelf::stopMotionFromSource(const LLUUID& source_id)
for (AnimSourceIterator motion_it = mAnimationSources.find(source_id); motion_it != mAnimationSources.end(); )
{
gAgent.sendAnimationRequest(motion_it->second, ANIM_REQUEST_STOP);
- mAnimationSources.erase(motion_it++);
+ mAnimationSources.erase(motion_it);
+ // Must find() after each erase() to deal with potential iterator invalidation
+ // This also ensures that we don't go past the end of this source's animations
+ // into those of another source.
+ motion_it = mAnimationSources.find(source_id);
}