summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2024-04-26 22:00:32 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-04-26 22:00:32 -0700
commit62cd262ccafa000de1a155ccc171eabf9b90d5b3 (patch)
tree48a1a612fd6e30ad5562923b77977a2f4f3fd16b /indra/newview
parent4c4d23acb00960d1bc812eab4656d3f4cdcd70e3 (diff)
attempt to access participant after it's deleted
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvoicewebrtc.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 94cf617bad..0edbe5abc2 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -1194,13 +1194,14 @@ void LLWebRTCVoiceClient::sessionState::removeParticipant(const LLWebRTCVoiceCli
if (participant)
{
+ LLUUID participantID = participant->mAvatarID;
participantUUIDMap::iterator iter = mParticipantsByUUID.find(participant->mAvatarID);
- LL_DEBUGS("Voice") << "participant \"" << participant->mURI << "\" (" << participant->mAvatarID << ") removed." << LL_ENDL;
+ LL_DEBUGS("Voice") << "participant \"" << participant->mURI << "\" (" << participantID << ") removed." << LL_ENDL;
if (iter == mParticipantsByUUID.end())
{
- LL_WARNS("Voice") << "Internal error: participant ID " << participant->mAvatarID << " not in UUID map" << LL_ENDL;
+ LL_WARNS("Voice") << "Internal error: participant ID " << participantID << " not in UUID map" << LL_ENDL;
}
else
{
@@ -1210,7 +1211,7 @@ void LLWebRTCVoiceClient::sessionState::removeParticipant(const LLWebRTCVoiceCli
LLWebRTCVoiceClient::getInstance()->notifyParticipantObservers();
}
}
- if (mHangupOnLastLeave && (participant->mAvatarID != gAgentID) && (mParticipantsByUUID.size() <= 1))
+ if (mHangupOnLastLeave && (participantID != gAgentID) && (mParticipantsByUUID.size() <= 1))
{
LLWebRTCVoiceClient::getInstance()->notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL);
}