summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicechannel.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-08-13 08:55:23 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-08-13 19:30:17 +0300
commite086437f12db31cb2dcc2e8fdf12794cc802cc0d (patch)
treeeb96a312f846f584a1fe17a7f2f54b88c6fe0ffd /indra/newview/llvoicechannel.cpp
parent2e2f10f7dd1756251bb311cbc2ea872020d864c6 (diff)
viewer-private#262 webrtc crashes on shutdown
removeObserver failed to remove an im session floater
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r--indra/newview/llvoicechannel.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index 9b144048f7..8cda7c76da 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -81,10 +81,7 @@ LLVoiceChannel::~LLVoiceChannel()
{
sCurrentVoiceChannel = NULL;
// Must check instance exists here, the singleton MAY have already been destroyed.
- if(LLVoiceClient::instanceExists())
- {
- LLVoiceClient::getInstance()->removeObserver(this);
- }
+ LLVoiceClient::removeObserver(this);
}
sVoiceChannelMap.erase(mSessionID);
@@ -219,7 +216,7 @@ void LLVoiceChannel::deactivate()
LLVoiceClient::getInstance()->setUserPTTState(false);
}
}
- LLVoiceClient::getInstance()->removeObserver(this);
+ LLVoiceClient::removeObserver(this);
if (sCurrentVoiceChannel == this)
{
@@ -259,7 +256,7 @@ void LLVoiceChannel::activate()
setState(STATE_CALL_STARTED);
}
- LLVoiceClient::getInstance()->addObserver(this);
+ LLVoiceClient::addObserver(this);
//do not send earlier, channel should be initialized, should not be in STATE_NO_CHANNEL_INFO state
sCurrentVoiceChannelChangedSignal(this->mSessionID);
@@ -751,7 +748,7 @@ void LLVoiceChannelProximal::deactivate()
{
setState(STATE_HUNG_UP);
}
- LLVoiceClient::getInstance()->removeObserver(this);
+ LLVoiceClient::removeObserver(this);
LLVoiceClient::getInstance()->activateSpatialChannel(false);
}