diff options
| author | Howard Stearns <howard.stearns@gmail.com> | 2022-02-28 15:54:23 -0800 |
|---|---|---|
| committer | Howard Stearns <howard.stearns@gmail.com> | 2022-02-28 15:54:23 -0800 |
| commit | 130d0c0704c97a427bc28f9164f71ce67535e894 (patch) | |
| tree | b27e61d8c2e3aeb91ecd1b0b8177ff2a7bdb665e /indra/llui/lltextbase.cpp | |
| parent | 932b7de5309bc8599655ebb77666c41f5a81cfa9 (diff) | |
| parent | 6ca09a94554ec01f5c94ec60fffd01d7e33f3546 (diff) | |
Merge branch 'master' of bitbucket.org:lindenlab/viewer into SL-9749
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; |
