summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-03-09 21:11:19 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-03-09 21:11:19 +0200
commitb9ac5b8ac43d48fa6d34d513e595ad1e2a5d6307 (patch)
tree3d50e194cec276e670d87df9a23472ca39bc8fdc /indra
parent4a4c1388919167f14ef9b48bd2709b07af8b0685 (diff)
SL-16992 Crash at LLVivoxVoiceClient::notifyStatusObservers
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llconversationview.cpp19
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp2
2 files changed, 15 insertions, 6 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index fee85d50bd..20fa6d490b 100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -96,10 +96,14 @@ LLConversationViewSession::~LLConversationViewSession()
{
mActiveVoiceChannelConnection.disconnect();
- if(LLVoiceClient::instanceExists() && mVoiceClientObserver)
- {
- LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver);
- }
+ if (mVoiceClientObserver)
+ {
+ if (LLVoiceClient::instanceExists())
+ {
+ LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver);
+ }
+ delete mVoiceClientObserver;
+ }
mFlashTimer->unset();
}
@@ -255,7 +259,12 @@ BOOL LLConversationViewSession::postBuild()
mIsInActiveVoiceChannel = true;
if(LLVoiceClient::instanceExists())
{
- LLNearbyVoiceClientStatusObserver* mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this);
+ if (mVoiceClientObserver)
+ {
+ LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver);
+ delete mVoiceClientObserver;
+ }
+ mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this);
LLVoiceClient::getInstance()->addObserver(mVoiceClientObserver);
}
break;
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 43dc304c10..34499ac170 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -384,7 +384,7 @@ void LLFloaterIMSessionTab::draw()
void LLFloaterIMSessionTab::enableDisableCallBtn()
{
- if (LLVoiceClient::instanceExists())
+ if (LLVoiceClient::instanceExists() && mVoiceButton)
{
mVoiceButton->setEnabled(
mSessionID.notNull()