summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-17 12:13:59 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-17 12:13:59 +0100
commit3f10caafc07b0d1a60d2b943684e87dec265f5bc (patch)
tree304e8ba88d7d1f9ebf4681dfcbeb1864d9a4785d /indra/newview/llimview.cpp
parent06884cf1371d4c1ee02d337242e46b0f3bbe8837 (diff)
parent7d349bfde33e7882b0ddf79def10974330309c7f (diff)
merge from viewer-hotfix
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 10146ee9d3..4357c7d426 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1459,7 +1459,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;