From 34b1f01a8681a6f65ec2f548bd1fb844a6627c0b Mon Sep 17 00:00:00 2001 From: staz <74452129+alyanser@users.noreply.github.com> Date: Sat, 7 May 2022 16:59:46 +0500 Subject: [PATCH] Fixed an invalid index check (#2937) --- src/widgets/GlibcHeapWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/GlibcHeapWidget.cpp b/src/widgets/GlibcHeapWidget.cpp index 47278fa6..a06f6a77 100644 --- a/src/widgets/GlibcHeapWidget.cpp +++ b/src/widgets/GlibcHeapWidget.cpp @@ -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);