diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-02-28 22:01:18 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-02-28 22:01:18 +0200 |
| commit | e70fe3a50d43bd5276f80c9f82fcfb2de02109cb (patch) | |
| tree | c35ab61e94d7b93e0e8be63f60c439d3b6a8c4b9 /indra/llui/lltextbase.cpp | |
| parent | 15861d8dec096de57b0b51fa55a61a199a0f4337 (diff) | |
| parent | 6ca09a94554ec01f5c94ec60fffd01d7e33f3546 (diff) | |
Merge branch 'master' into DRTVWR-483
# Conflicts:
# indra/newview/llviewermenu.cpp
Diffstat (limited to 'indra/llui/lltextbase.cpp')
| -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 e40612b862..2cfcd1ee38 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1606,11 +1606,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; |
