Fix crash in mosaic layout.

This commit is contained in:
John Preston 2021-07-28 17:34:39 +03:00
parent 868c494299
commit 4ef2d3b957
1 changed files with 2 additions and 3 deletions

View File

@ -251,13 +251,12 @@ int AbstractMosaicLayout::validateExistingRows(
auto untilRow = 0;
auto untilCol = 0;
while (until < count) {
auto &rowItems = _rows[untilRow].items;
if ((untilRow >= _rows.size())
|| checkItem(rowItems[untilCol], until)) {
|| checkItem(_rows[untilRow].items[untilCol], until)) {
break;
}
++until;
if (++untilCol == rowItems.size()) {
if (++untilCol == _rows[untilRow].items.size()) {
++untilRow;
untilCol = 0;
}