summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationview.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/llconversationview.cpp
parent2e2f10f7dd1756251bb311cbc2ea872020d864c6 (diff)
viewer-private#262 webrtc crashes on shutdown
removeObserver failed to remove an im session floater
Diffstat (limited to 'indra/newview/llconversationview.cpp')
-rw-r--r--indra/newview/llconversationview.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 117dab8d58..03eb9f0652 100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -98,10 +98,7 @@ LLConversationViewSession::~LLConversationViewSession()
if (mVoiceClientObserver)
{
- if (LLVoiceClient::instanceExists())
- {
- LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver);
- }
+ LLVoiceClient::removeObserver(mVoiceClientObserver);
delete mVoiceClientObserver;
}
@@ -259,16 +256,15 @@ BOOL LLConversationViewSession::postBuild()
icon->setVisible(true);
mSpeakingIndicator->setSpeakerId(gAgentID, LLUUID::null, true);
mIsInActiveVoiceChannel = true;
- if(LLVoiceClient::instanceExists())
+
+ if (mVoiceClientObserver)
{
- if (mVoiceClientObserver)
- {
- LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver);
- delete mVoiceClientObserver;
- }
- mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this);
- LLVoiceClient::getInstance()->addObserver(mVoiceClientObserver);
+ LLVoiceClient::removeObserver(mVoiceClientObserver);
+ delete mVoiceClientObserver;
}
+ mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this);
+ LLVoiceClient::addObserver(mVoiceClientObserver);
+
break;
}
default: