Fixed an invalid index check (#2937)

This commit is contained in:
staz 2022-05-07 16:59:46 +05:00 committed by GitHub
parent d2243006e2
commit 8cb4f867fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ void GlibcHeapWidget::updateArenas()
}
// check if arenas reduced or invalid index and restore the previously selected arena
if (arenaSelectorView->count() < currentIndex || currentIndex == -1) {
if (arenaSelectorView->count() <= currentIndex || currentIndex == -1) {
currentIndex = 0;
}
arenaSelectorView->setCurrentIndex(currentIndex);