summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicewebrtc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoicewebrtc.cpp')
-rw-r--r--indra/newview/llvoicewebrtc.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 2bd6eee84d..0823358e03 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -1230,16 +1230,19 @@ void LLWebRTCVoiceClient::sessionState::removeParticipant(const LLWebRTCVoiceCli
void LLWebRTCVoiceClient::sessionState::removeAllParticipants(const LLUUID &region)
{
- LL_DEBUGS("Voice") << "called" << LL_ENDL;
-
+ std::vector<participantStatePtr_t> participantsToRemove;
- for (auto &&participant : mParticipantsByUUID)
+ for (auto& participantEntry : mParticipantsByUUID)
{
- if (region.isNull() || (participant.second->mRegion == region))
+ if (region.isNull() || (participantEntry.second->mRegion == region))
{
- removeParticipant(participant.second);
+ participantsToRemove.push_back(participantEntry.second);
}
}
+ for (auto& participant : participantsToRemove)
+ {
+ removeParticipant(participant);
+ }
}
// Initiated the various types of sessions.