SL-16157 Crash at LLFontGL::maxDrawableChars

master
Andrey Kleshchev 2021-10-08 02:12:28 +03:00
parent fea2d7bacc
commit bdb4a90e7c
1 changed files with 8 additions and 5 deletions

View File

@ -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;