diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 3643ce64cf..15c6c1dea7 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -279,7 +279,6 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p) // word wrap was added accroding to the EXT-6841 text_p.wrap(true); addChild(LLUICtrlFactory::create(text_p)); - mCommentTextView=getChildView("comment_text"); } S32 LLScrollListCtrl::getSearchColumn() @@ -478,6 +477,10 @@ void LLScrollListCtrl::updateLayout() getRect().getWidth() - 2 * mBorderThickness, getRect().getHeight() - (2 * mBorderThickness ) - heading_size ); + if (mCommentTextView == NULL) + { + mCommentTextView = getChildView("comment_text"); + } mCommentTextView->setShape(mItemListRect); // how many lines of content in a single "page" @@ -1493,7 +1496,10 @@ void LLScrollListCtrl::draw() mColumnsDirty = FALSE; } - mCommentTextView->setVisible(mItemList.empty()); + if (mCommentTextView) + { + mCommentTextView->setVisible(mItemList.empty()); + } drawItems();