diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-07-05 11:54:50 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-07-05 11:54:50 +0100 |
commit | f954db02638e32677d5fe61abdf0079b434d725c (patch) | |
tree | ee126e5c3a9462946962f1cec00065561af8d794 /indra | |
parent | a05c48cf140f483546828fa264c8904d190d46bc (diff) |
Checker: FORWARD_NULL
Function: LLChatHistory::appendMessage(const LLChat &, const LLSD &, const LLStyle::Params &)
File: /indra/newview/llchathistory.cpp
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llchathistory.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index ac12bffdfb..c0fa910f86 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -557,11 +557,14 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL { bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean(); - if(mEditor) + llassert(mEditor); + if (!mEditor) { - mEditor->setPlainText(use_plain_text_chat_history); + return; } + mEditor->setPlainText(use_plain_text_chat_history); + if (!mEditor->scrolledToEnd() && chat.mFromID != gAgent.getID() && !chat.mFromName.empty()) { mUnreadChatSources.insert(chat.mFromName); @@ -740,7 +743,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL mIsLastMessageFromLog = message_from_log; } - if (chat.mNotifId.notNull()) + if (chat.mNotifId.notNull()) { LLNotificationPtr notification = LLNotificationsUtil::find(chat.mNotifId); if (notification != NULL) @@ -832,6 +835,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL mEditor->appendText(message, FALSE, style_params); } + mEditor->blockUndo(); // automatically scroll to end when receiving chat from myself |