UI-Coordinates: fix potential segfault

...when truncating to a position within the inline part, yet behind the actual end
This commit is contained in:
Fischlurch 2017-12-27 01:57:15 +01:00
parent b8047b3310
commit 1a6cac9d66

View file

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