summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicechannel.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-09-26 21:25:11 +0100
committerGraham Linden <graham@lindenlab.com>2018-09-26 21:25:11 +0100
commit2783783575a9b712eb318b450dc5e6bb17d7f7c5 (patch)
treefdec4e4cf274e2a916e22d73d11afbce5bb669c0 /indra/newview/llvoicechannel.cpp
parent6d256d679e9cea63753266420ed79efa8b70dee2 (diff)
parent58aef8beaf79dc83546a7b080014ca5030733ac8 (diff)
Merge to 5.2.0
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r--indra/newview/llvoicechannel.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index c58e98b3fb..f971554c9d 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -74,10 +74,18 @@ LLVoiceChannel::LLVoiceChannel(const LLUUID& session_id, const std::string& sess
LLVoiceChannel::~LLVoiceChannel()
{
- // Must check instance exists here, the singleton MAY have already been destroyed.
- if(LLVoiceClient::instanceExists())
+ if (sSuspendedVoiceChannel == this)
{
- LLVoiceClient::getInstance()->removeObserver(this);
+ sSuspendedVoiceChannel = NULL;
+ }
+ if (sCurrentVoiceChannel == this)
+ {
+ sCurrentVoiceChannel = NULL;
+ // Must check instance exists here, the singleton MAY have already been destroyed.
+ if(LLVoiceClient::instanceExists())
+ {
+ LLVoiceClient::getInstance()->removeObserver(this);
+ }
}
sVoiceChannelMap.erase(mSessionID);