From 98751d27059326aaa82fde008d6f0e83af08685f Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 5 Dec 2011 01:17:21 +0100 Subject: [PATCH] Crashfix in LLScrollListCtrl; Viewer crashes on opening gesture editor --- indra/llui/llscrolllistctrl.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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();