summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationview.cpp
diff options
context:
space:
mode:
authorEuclid Linden <euclid@lindenlab.com>2022-04-18 22:19:14 +0000
committerEuclid Linden <euclid@lindenlab.com>2022-04-18 22:19:14 +0000
commit030d61ac58be38f9f8aafeb68b383d88d670080b (patch)
tree79af0678906bf9e05316614d52b4cf5e97d1adc2 /indra/newview/llconversationview.cpp
parent6ca09a94554ec01f5c94ec60fffd01d7e33f3546 (diff)
parentd031662435d97101411ae990ed85d6e001ab668a (diff)
Merged in D559-merge-6.5.5 (pull request #946)
DRTVWR-559 merge up to 6.5.5
Diffstat (limited to 'indra/newview/llconversationview.cpp')
-rw-r--r--indra/newview/llconversationview.cpp19
1 files changed, 14 insertions, 5 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;