summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychathandler.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-05-02 15:59:15 -0700
committerMerov Linden <merov@lindenlab.com>2012-05-02 15:59:15 -0700
commit56af97063aaa35c1a70f5edaf47f4a015600860d (patch)
tree299b113fab1ff7176c86342aa3e881491cd3b883 /indra/newview/llnearbychathandler.cpp
parentb679975d8fdc22d33d0f62288934be8f0209157e (diff)
parent681c5de92bd09622de360818682240b0a17403f7 (diff)
Pull from vir/drano
Diffstat (limited to 'indra/newview/llnearbychathandler.cpp')
-rw-r--r--indra/newview/llnearbychathandler.cpp11
1 files changed, 7 insertions, 4 deletions
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<LLNearbyChatScreenChannel*>(mChannel);
+ LLNearbyChatScreenChannel* channel = dynamic_cast<LLNearbyChatScreenChannel*>(mChannel.get());
if(channel)
{