diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-07-11 23:39:55 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-07-11 23:39:55 +0300 |
commit | a3326a4afc8f212264b1d301401e6591d194aa3f (patch) | |
tree | 4abee45ef46652a24370c4fd7b2dbe6cdfc152bc /indra | |
parent | e72c803df01e95d4ce73c0b207b1da9ea89eb144 (diff) |
SL-17752 Crash at removeMutedAVsLights
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/pipeline.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c297f0f080..5bf62f0524 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1773,15 +1773,20 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar) { LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; - for (light_set_t::iterator iter = gPipeline.mNearbyLights.begin(); - iter != gPipeline.mNearbyLights.end(); iter++) - { - if (iter->drawable->getVObj()->isAttachment() && iter->drawable->getVObj()->getAvatar() == muted_avatar) - { - gPipeline.mLights.erase(iter->drawable); - gPipeline.mNearbyLights.erase(iter); - } - } + light_set_t::iterator iter = gPipeline.mNearbyLights.begin(); + + while (iter != gPipeline.mNearbyLights.end()) + { + if (iter->drawable->getVObj()->isAttachment() && iter->drawable->getVObj()->getAvatar() == muted_avatar) + { + gPipeline.mLights.erase(iter->drawable); + iter = gPipeline.mNearbyLights.erase(iter); + } + else + { + iter++; + } + } } U32 LLPipeline::addObject(LLViewerObject *vobj) |