diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-10-08 02:12:28 +0300 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-10-08 02:12:36 +0300 | 
| commit | bdb4a90e7c8f05001cf084e30832cedde1b4a03e (patch) | |
| tree | dac5b98ea8f4c879cfdc7ddaffa17c58c3dd2e4a | |
| parent | fea2d7bacca421be87794f3ece5c1e6a8fa7414b (diff) | |
SL-16157 Crash at LLFontGL::maxDrawableChars
| -rw-r--r-- | indra/llui/lltextbase.cpp | 13 | 
1 files changed, 8 insertions, 5 deletions
| diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 20bea7fe24..ea2d357d5d 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1558,11 +1558,14 @@ void LLTextBase::reflow()  		{  			// find first element whose end comes after start_index  			line_list_t::iterator iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), start_index, line_end_compare()); -			line_start_index = iter->mDocIndexStart; -			line_count = iter->mLineNum; -			cur_top = iter->mRect.mTop; -			getSegmentAndOffset(iter->mDocIndexStart, &seg_iter, &seg_offset); -			mLineInfoList.erase(iter, mLineInfoList.end()); +            if (iter != mLineInfoList.end()) +            { +                line_start_index = iter->mDocIndexStart; +                line_count = iter->mLineNum; +                cur_top = iter->mRect.mTop; +                getSegmentAndOffset(iter->mDocIndexStart, &seg_iter, &seg_offset); +                mLineInfoList.erase(iter, mLineInfoList.end()); +            }  		}  		S32 line_height = 0; | 
