summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 344da345a9..d3058e67af 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -165,7 +165,7 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
if(mVoiceChannel)
{
- mVoiceChannel->setStateChangedCallback(boost::bind(&LLIMSession::onVoiceChannelStateChanged, this, _1, _2));
+ mVoiceChannelStateChangeConnection = mVoiceChannel->setStateChangedCallback(boost::bind(&LLIMSession::onVoiceChannelStateChanged, this, _1, _2));
}
mSpeakers = new LLIMSpeakerMgr(mVoiceChannel);
@@ -270,9 +270,11 @@ LLIMModel::LLIMSession::~LLIMSession()
}
}
+ mVoiceChannelStateChangeConnection.disconnect();
+
// HAVE to do this here -- if it happens in the LLVoiceChannel destructor it will call the wrong version (since the object's partially deconstructed at that point).
mVoiceChannel->deactivate();
-
+
delete mVoiceChannel;
mVoiceChannel = NULL;
}