simple fix for resizing too small causing an index out of range crash

Signed-off-by: coolguy1842 <coolguy1842.deport391@passfwd.com>
(cherry picked from commit 448ded2387)
This commit is contained in:
coolguy1842 2024-06-06 16:18:47 +10:00 committed by Trial97
parent b2e5ea46d7
commit d23fa73f52
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318

View File

@ -66,6 +66,9 @@ void VisualGroup::update()
rows[currentRow].height = maxRowHeight; rows[currentRow].height = maxRowHeight;
rows[currentRow].top = offsetFromTop; rows[currentRow].top = offsetFromTop;
currentRow++; currentRow++;
if(currentRow >= rows.size()) {
currentRow = rows.size() - 1;
}
offsetFromTop += maxRowHeight + 5; offsetFromTop += maxRowHeight + 5;
positionInRow = 0; positionInRow = 0;
maxRowHeight = 0; maxRowHeight = 0;