From a6833096c4593c78146b3e94a31e228302600b87 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <andreykproductengine@lindenlab.com> Date: Wed, 25 Aug 2021 17:12:22 +0300 Subject: [PATCH] SL-15881 Crash at setCommitCallback --- indra/newview/llchathistory.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index c110e0d815f..64d3f805a09 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -558,9 +558,15 @@ class LLChatHistoryHeader: public LLPanel mTimeBoxTextBox = getChild<LLTextBox>("time_box"); mInfoCtrl = LLUICtrlFactory::getInstance()->createFromFile<LLUICtrl>("inspector_info_ctrl.xml", this, LLPanel::child_registry_t::instance()); - llassert(mInfoCtrl != NULL); - mInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, mInfoCtrl)); - mInfoCtrl->setVisible(FALSE); + if (mInfoCtrl) + { + mInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, mInfoCtrl)); + mInfoCtrl->setVisible(FALSE); + } + else + { + LL_ERRS() << "Failed to create an interface element due to missing or corrupted file inspector_info_ctrl.xml" << LL_ENDL; + } return LLPanel::postBuild(); } -- GitLab