summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Linden <46733234+brad-linden@users.noreply.github.com>2024-06-25 12:28:52 -0700
committerGitHub <noreply@github.com>2024-06-25 12:28:52 -0700
commitc3d3a13dfee2e20333c6993a96aac3c2b6f4af52 (patch)
tree02912178cd9f2b0bf95f5456338268c58a3c8418 /indra
parent370e6154c461ec95d3a2921885c461b76e789ec8 (diff)
parent0f47b68e92a3951392ff2fc6bba7147860c1ce4d (diff)
Merge pull request #1842 from secondlife/roxie/webrtc-voice-crash-fixes
viewer#1821 Crash at getSessionID()
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llspeakers.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index 407e058132..b12e8d15fc 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -288,6 +288,10 @@ LLSpeakerMgr::~LLSpeakerMgr()
LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::string& name, LLSpeaker::ESpeakerStatus status, LLSpeaker::ESpeakerType type)
{
+ if (!mVoiceChannel)
+ {
+ return NULL;
+ }
LLUUID session_id = getSessionID();
if (id.isNull() || (id == session_id))
{
@@ -490,7 +494,7 @@ void LLSpeakerMgr::updateSpeakerList()
(LLVoiceClient::getInstance()->isParticipantAvatar(*participant_it)?LLSpeaker::SPEAKER_AGENT:LLSpeaker::SPEAKER_EXTERNAL));
}
}
- else
+ else if (mVoiceChannel)
{
// If not, check if the list is empty, except if it's Nearby Chat (session_id NULL).
LLUUID session_id = getSessionID();
@@ -816,7 +820,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id)
{
LLPointer<LLSpeaker> speakerp = findSpeaker(speaker_id);
- if (!speakerp) return;
+ if (!speakerp || !mVoiceChannel) return;
std::string url = gAgent.getRegionCapability("ChatSessionRequest");
LLSD data;
@@ -835,7 +839,7 @@ void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id)
void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute)
{
LLPointer<LLSpeaker> speakerp = findSpeaker(avatar_id);
- if (!speakerp) return;
+ if (!speakerp || !mVoiceChannel) return;
// *NOTE: mantipov: probably this condition will be incorrect when avatar will be blocked for
// text chat via moderation (LLSpeaker::mModeratorMutedText == TRUE)