viewer#1018 Crash at insertStringNoUndo
getEditableIndex retuns pos as is if only one segment is presentmaster
parent
4ee22b3347
commit
73318bbc6a
|
|
@ -845,7 +845,14 @@ S32 LLTextBase::insertStringNoUndo(S32 pos, const LLWString &wstr, LLTextBase::s
|
|||
S32 old_len = getLength(); // length() returns character length
|
||||
S32 insert_len = wstr.length();
|
||||
|
||||
pos = getEditableIndex(pos, true);
|
||||
pos = getEditableIndex(pos, true);
|
||||
if (pos > old_len)
|
||||
{
|
||||
pos = old_len;
|
||||
// Should not happen,
|
||||
// if you encounter this, check where wrong position comes from
|
||||
llassert(false);
|
||||
}
|
||||
|
||||
segment_set_t::iterator seg_iter = getEditableSegIterContaining(pos);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue