summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsession.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/llfloaterimsession.cpp
parent2e2f10f7dd1756251bb311cbc2ea872020d864c6 (diff)
viewer-private#262 webrtc crashes on shutdown
removeObserver failed to remove an im session floater
Diffstat (limited to 'indra/newview/llfloaterimsession.cpp')
-rw-r--r--indra/newview/llfloaterimsession.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index b782515c14..f954e72376 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -287,10 +287,8 @@ void LLFloaterIMSession::sendMsg(const std::string& msg)
LLFloaterIMSession::~LLFloaterIMSession()
{
mVoiceChannelStateChangeConnection.disconnect();
- if(LLVoiceClient::instanceExists())
- {
- LLVoiceClient::getInstance()->removeObserver(this);
- }
+
+ LLVoiceClient::removeObserver(this);
LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this);
@@ -366,7 +364,7 @@ BOOL LLFloaterIMSession::postBuild()
childSetAction("voice_call_btn", boost::bind(&LLFloaterIMSession::onCallButtonClicked, this));
- LLVoiceClient::getInstance()->addObserver(this);
+ LLVoiceClient::addObserver(this);
//*TODO if session is not initialized yet, add some sort of a warning message like "starting session...blablabla"
//see LLFloaterIMPanel for how it is done (IB)
@@ -537,6 +535,7 @@ void LLFloaterIMSession::boundVoiceChannel()
LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID);
if(voice_channel)
{
+ mVoiceChannelStateChangeConnection.disconnect();
mVoiceChannelStateChangeConnection = voice_channel->setStateChangedCallback(
boost::bind(&LLFloaterIMSession::onVoiceChannelStateChanged, this, _1, _2));