summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelimcontrolpanel.cpp
diff options
context:
space:
mode:
authorSergei Litovchuk <slitovchuk@productengine.com>2009-12-03 15:52:48 +0200
committerSergei Litovchuk <slitovchuk@productengine.com>2009-12-03 15:52:48 +0200
commitec48cc1a40fc189de379ca3dd198e3b96395ce33 (patch)
treebd6fbcbdc138a152aa62ac9891f7432611c7b45e /indra/newview/llpanelimcontrolpanel.cpp
parent8157e8989102f1585fb13f6ad3822fbb7a4720c6 (diff)
No ticket. Fixed using LLVoiceChannel::setStateChangedCallback() in IM Panel and IM View.
- Added disconnecting signal in destructor. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llpanelimcontrolpanel.cpp')
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index 405c95fc22..8c19865550 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -71,6 +71,11 @@ void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::E
childSetVisible("call_btn", ! is_call_started);
}
+LLPanelChatControlPanel::~LLPanelChatControlPanel()
+{
+ mVoiceChannelStateChangeConnection.disconnect();
+}
+
BOOL LLPanelChatControlPanel::postBuild()
{
childSetAction("call_btn", boost::bind(&LLPanelChatControlPanel::onCallButtonClicked, this));
@@ -113,7 +118,9 @@ void LLPanelChatControlPanel::setSessionId(const LLUUID& session_id)
mSessionId = session_id;
LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionId);
if(voice_channel)
- voice_channel->setStateChangedCallback(boost::bind(&LLPanelChatControlPanel::onVoiceChannelStateChanged, this, _1, _2));
+ {
+ mVoiceChannelStateChangeConnection = voice_channel->setStateChangedCallback(boost::bind(&LLPanelChatControlPanel::onVoiceChannelStateChanged, this, _1, _2));
+ }
}
LLPanelIMControlPanel::LLPanelIMControlPanel()