diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-17 12:03:36 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-17 12:03:36 +0100 |
commit | 7d349bfde33e7882b0ddf79def10974330309c7f (patch) | |
tree | 505143914a5f1848fc3a3942fd3dd32a320d9880 /indra/newview/llimview.cpp | |
parent | 6154ba6e8f7b80b3e78f2df9c139386c17e1405d (diff) | |
parent | cda29adca1a4882d6201f7e232a26d561a1d33fd (diff) |
merge from PE's viewer-hotfix
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 7a4febec20..4780e985ca 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1437,7 +1437,13 @@ void LLCallDialogManager::onVoiceChannelChanged(const LLUUID &session_id) } sSession = session; - sSession->mVoiceChannel->setStateChangedCallback(boost::bind(LLCallDialogManager::onVoiceChannelStateChanged, _1, _2, _3, _4)); + + static boost::signals2::connection prev_channel_state_changed_connection; + // disconnect previously connected callback to avoid have invalid sSession in onVoiceChannelStateChanged() + prev_channel_state_changed_connection.disconnect(); + prev_channel_state_changed_connection = + sSession->mVoiceChannel->setStateChangedCallback(boost::bind(LLCallDialogManager::onVoiceChannelStateChanged, _1, _2, _3, _4)); + if(sCurrentSessionlName != session->mName) { sPreviousSessionlName = sCurrentSessionlName; |