summaryrefslogtreecommitdiff
path: root/indra/newview/llvoiceclient.cpp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-08-15 09:41:54 -0700
committerBrad Linden <brad@lindenlab.com>2024-08-15 09:41:54 -0700
commit5f26ba801475d1a212b00503197dbc5a77cee1d8 (patch)
treecf8aa8c3189462ea3ac51866be243e6fd8a70be6 /indra/newview/llvoiceclient.cpp
parentac330f63fd7ac655bbd06ce5d4ed65430aa2f42a (diff)
parent3ca4bb6bf7ba1367e06705da3968174ff9448d7d (diff)
Merge remote-tracking branch 'origin/release/webrtc-voice' into release/2024.06-atlasaurus
# Conflicts: # indra/newview/llpanelpeople.cpp
Diffstat (limited to 'indra/newview/llvoiceclient.cpp')
-rw-r--r--indra/newview/llvoiceclient.cpp30
1 files changed, 24 insertions, 6 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 21f469abb3..5af7528ada 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -796,8 +796,14 @@ void LLVoiceClient::addObserver(LLVoiceClientStatusObserver* observer)
void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer)
{
- LLVivoxVoiceClient::getInstance()->removeObserver(observer);
- LLWebRTCVoiceClient::getInstance()->removeObserver(observer);
+ if (LLVivoxVoiceClient::instanceExists())
+ {
+ LLVivoxVoiceClient::getInstance()->removeObserver(observer);
+ }
+ if (LLWebRTCVoiceClient::instanceExists())
+ {
+ LLWebRTCVoiceClient::getInstance()->removeObserver(observer);
+ }
}
void LLVoiceClient::addObserver(LLFriendObserver* observer)
@@ -808,8 +814,14 @@ void LLVoiceClient::addObserver(LLFriendObserver* observer)
void LLVoiceClient::removeObserver(LLFriendObserver* observer)
{
- LLVivoxVoiceClient::getInstance()->removeObserver(observer);
- LLWebRTCVoiceClient::getInstance()->removeObserver(observer);
+ if (LLVivoxVoiceClient::instanceExists())
+ {
+ LLVivoxVoiceClient::getInstance()->removeObserver(observer);
+ }
+ if (LLWebRTCVoiceClient::instanceExists())
+ {
+ LLWebRTCVoiceClient::getInstance()->removeObserver(observer);
+ }
}
void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer)
@@ -820,8 +832,14 @@ void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer)
void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer)
{
- LLVivoxVoiceClient::getInstance()->removeObserver(observer);
- LLWebRTCVoiceClient::getInstance()->removeObserver(observer);
+ if (LLVivoxVoiceClient::instanceExists())
+ {
+ LLVivoxVoiceClient::getInstance()->removeObserver(observer);
+ }
+ if (LLWebRTCVoiceClient::instanceExists())
+ {
+ LLWebRTCVoiceClient::getInstance()->removeObserver(observer);
+ }
}
std::string LLVoiceClient::sipURIFromID(const LLUUID &id) const