summaryrefslogtreecommitdiff
path: root/indra/newview/llchathistory.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-08-18 19:45:23 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-08-18 19:45:23 +0300
commitc3b1eadf88c380bf932f89c541d0ac60da617256 (patch)
treee3783980198da377080835efabed706bd5a0bfa9 /indra/newview/llchathistory.cpp
parentb102ee2dddf948679d11412a84e958dc61ad7211 (diff)
parente8b31d03b4f6f0ffb981b4ea150743daf7b4a958 (diff)
Merge branch 'master' into DRTVWR-514-keymappings
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r--indra/newview/llchathistory.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 4131af828e..431a8c60be 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -1085,7 +1085,8 @@ LLView* LLChatHistory::getSeparator()
LLView* LLChatHistory::getHeader(const LLChat& chat,const LLStyle::Params& style_params, const LLSD& args)
{
LLChatHistoryHeader* header = LLChatHistoryHeader::createInstance(mMessageHeaderFilename);
- header->setup(chat, style_params, args);
+ if (header)
+ header->setup(chat, style_params, args);
return header;
}
@@ -1298,6 +1299,12 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
view = getSeparator();
p.top_pad = mTopSeparatorPad;
p.bottom_pad = mBottomSeparatorPad;
+ if (!view)
+ {
+ // Might be wiser to make this LL_ERRS, getSeparator() should work in case of correct instalation.
+ LL_WARNS() << "Failed to create separator from " << mMessageSeparatorFilename << ": can't append to history" << LL_ENDL;
+ return;
+ }
}
else
{
@@ -1306,7 +1313,12 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
p.top_pad = 0;
else
p.top_pad = mTopHeaderPad;
- p.bottom_pad = mBottomHeaderPad;
+ p.bottom_pad = mBottomHeaderPad;
+ if (!view)
+ {
+ LL_WARNS() << "Failed to create header from " << mMessageHeaderFilename << ": can't append to history" << LL_ENDL;
+ return;
+ }
}
p.view = view;