From 9c55ff93903d19b22dec63a6db26e9ec3436fbf5 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Fri, 6 Nov 2009 22:13:59 +0200 Subject: Fixed normal bug EXT-1509 "Going into mouselook while in a private call ruins the call floater.": - Made callfloater a single instance floater. - Updated floater IM panel visibility change logic. - Added NULL checks for voice client pointers in LLFloaterIMPanel. --HG-- branch : product-engine --- indra/newview/llimpanel.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 7399f1e1b3..0b8b5935f8 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -321,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); @@ -770,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() -- cgit v1.2.3