From dd012cc375680c1907e16baa675d29d40ad4f43c Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 12 Apr 2012 23:09:47 +0300 Subject: CHUI-87 FIXED crash in handling notifications after viewer disconnect. Notification handlers now use LLHandles to screen channels. --- indra/newview/llnearbychathandler.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview/llnearbychathandler.cpp') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 240a7c7a35..600fd395fb 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -458,7 +458,9 @@ LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& i channel->setCreatePanelCallback(callback); - mChannel = LLChannelManager::getInstance()->addChannel(channel); + LLChannelManager::getInstance()->addChannel(channel); + + mChannel = channel->getHandle(); } LLNearbyChatHandler::~LLNearbyChatHandler() @@ -558,11 +560,12 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, && nearby_chat->isInVisibleChain() || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT && gSavedSettings.getBOOL("UseChatBubbles") ) - || !mChannel->getShowToasts() ) // to prevent toasts in Busy mode + || mChannel.isDead() + || !mChannel.get()->getShowToasts() ) // to prevent toasts in Busy mode return;//no need in toast if chat is visible or if bubble chat is enabled // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } @@ -579,7 +582,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, } */ - LLNearbyChatScreenChannel* channel = dynamic_cast(mChannel); + LLNearbyChatScreenChannel* channel = dynamic_cast(mChannel.get()); if(channel) { -- cgit v1.2.3