Skip to content
Snippets Groups Projects
Commit da4d2706 authored by andreykproductengine's avatar andreykproductengine
Browse files

MAINT-8959 Fixed some pointers not being reset

parent ac5a5470
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment