diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-06-08 20:22:36 +0300 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-06-08 20:22:36 +0300 |
commit | 1d3266910c5fbcc3c811cf82e0ebfbc7234f8df0 (patch) | |
tree | ed5482d48c114fd292d38614aa53f60d452a8980 /indra/newview | |
parent | 1b236217560aeb81d5eea5a6b67b1f9896b005a8 (diff) |
MAINT-8742 Crashes at draw and getHandle
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llchathistory.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 97a71a8802..1099d4bc09 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -528,10 +528,24 @@ public: registrar_enable.add("ObjectIcon.Visible", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemVisible, this, _2)); LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - mPopupMenuHandleAvatar = menu->getHandle(); + if (menu) + { + mPopupMenuHandleAvatar = menu->getHandle(); + } + else + { + LL_WARNS() << " Failed to create menu_avatar_icon.xml" << LL_ENDL; + } menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_object_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - mPopupMenuHandleObject = menu->getHandle(); + if (menu) + { + mPopupMenuHandleObject = menu->getHandle(); + } + else + { + LL_WARNS() << " Failed to create menu_object_icon.xml" << LL_ENDL; + } setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::showInspector, this)); @@ -619,7 +633,12 @@ public: } mUserNameFont = style_params.font(); - LLTextBox* user_name = getChild<LLTextBox>("user_name"); + if (!mUserNameTextBox) + { + mUserNameTextBox = getChild<LLTextBox>("user_name"); + mTimeBoxTextBox = getChild<LLTextBox>("time_box"); + } + LLTextBox* user_name = mUserNameTextBox; user_name->setReadOnlyColor(style_params.readonly_color()); user_name->setColor(style_params.color()); |