summaryrefslogtreecommitdiff
path: root/indra/newview/llimpanel.cpp
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-09 15:59:29 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-09 15:59:29 +0200
commit1b0732183e4437ce673b13c8092f8122db884587 (patch)
treedc913dbaab1699bb27854d9f22531aa2a6f86e28 /indra/newview/llimpanel.cpp
parent148a29ea1ec97922180ca8f0f6ced9a4a9e05c07 (diff)
parent21c51025da7f9128a1b425a5e88331ae0e3fe4d4 (diff)
Merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llimpanel.cpp')
-rw-r--r--indra/newview/llimpanel.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index c4beb666ea..0b8b5935f8 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -70,6 +70,7 @@
#include "llpanelimcontrolpanel.h"
#include "llrecentpeople.h"
#include "llresmgr.h"
+#include "lltooldraganddrop.h"
#include "lltrans.h"
#include "lltabcontainer.h"
#include "llviewertexteditor.h"
@@ -320,6 +321,9 @@ void LLFloaterIMPanel::draw()
// hide/show start call and end call buttons
LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionUUID);
+ if (!voice_channel)
+ return;
+
childSetVisible("end_call_btn", LLVoiceClient::voiceEnabled() && voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED);
childSetVisible("start_call_btn", LLVoiceClient::voiceEnabled() && voice_channel->getState() < LLVoiceChannel::STATE_CALL_STARTED);
childSetEnabled("start_call_btn", enable_connect);
@@ -769,10 +773,13 @@ void LLFloaterIMPanel::onVisibilityChange(const LLSD& new_visibility)
}
LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionUUID);
- if (new_visibility.asBoolean() && voice_channel->getState() == LLVoiceChannel::STATE_CONNECTED)
- LLFloaterReg::showInstance("voice_call", mSessionUUID);
- else
- LLFloaterReg::hideInstance("voice_call", mSessionUUID);
+ if (voice_channel && voice_channel->getState() == LLVoiceChannel::STATE_CONNECTED)
+ {
+ if (new_visibility.asBoolean())
+ LLFloaterReg::showInstance("voice_call", mSessionUUID);
+ else
+ LLFloaterReg::hideInstance("voice_call", mSessionUUID);
+ }
}
void LLFloaterIMPanel::sendMsg()