]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
revuo: fix bounds check
authortobtoht <tob@featherwallet.org>
Mon, 7 Oct 2024 17:15:48 +0000 (19:15 +0200)
committertobtoht <tob@featherwallet.org>
Mon, 7 Oct 2024 17:15:48 +0000 (19:15 +0200)
src/plugins/revuo/RevuoWidget.cpp

index 304e04ec94c7f3e4935c5f4d530f9e14638e89cf..84ea7f2c55147c4514de932cbe607a06a47b62cd 100644 (file)
@@ -92,7 +92,7 @@ void RevuoWidget::updateItems(const QList<QSharedPointer<RevuoItem>> &items) {
 }
 
 void RevuoWidget::onSelectItem(int index) {
-    if (index >= m_items.length()) {
+    if (index >= m_items.length() || index < 0) {
         ui->textBrowser->setText("<h4>No item selected</h4>");
         return;
     }