diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-08-07 17:23:27 +0300 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-08-07 17:23:27 +0300 |
commit | da4d270695610de8f8a49c33cc5c74aca06234bf (patch) | |
tree | f1fe81e423861b290048b142a8166950bef50dd6 /indra/newview | |
parent | ac5a5470191431dcdc0f97c8c144d677d76c92f0 (diff) |
MAINT-8959 Fixed some pointers not being reset
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llvoicechannel.cpp | 14 |
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); |