revuo: fix bounds check

This commit is contained in:
tobtoht
2024-10-07 19:15:48 +02:00
parent 90505aaa32
commit 8eb8d9fc34
+1 -1
View 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;
}