UI-Coordinates: fix potential segfault
...when truncating to a position within the inline part, yet behind the actual end
This commit is contained in:
parent
b8047b3310
commit
1a6cac9d66
1 changed files with 3 additions and 2 deletions
|
|
@ -484,8 +484,9 @@ namespace lib {
|
|||
{
|
||||
Literal* end = elms_.end();
|
||||
Literal* pos = getPosition(newSize);
|
||||
for ( ; pos!=end; ++pos)
|
||||
setContent (pos, nullptr);
|
||||
if (pos)
|
||||
for ( ; pos!=end; ++pos)
|
||||
setContent (pos, nullptr);
|
||||
tail_.resizeTo (0);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue