diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-02-28 22:02:26 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-02-28 22:02:26 +0200 |
| commit | 7f315b1552dd01e0ee2ff58e84f1fc87fa675cdf (patch) | |
| tree | b48d3f2d1e5b27ad6edd3263411f364e6ceb2428 /indra/llui/lltextbase.cpp | |
| parent | 31a074c3c41cd96f9656ec7510c6eff7ebec440e (diff) | |
| parent | 6ca09a94554ec01f5c94ec60fffd01d7e33f3546 (diff) | |
Merge branch 'master' into DRTVWR-486
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 05788f1b6c..0532750dce 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1564,11 +1564,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; |
