From d9f1a109f90f61dd917ad3ddce5894580086340e Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Mon, 12 Jun 2023 15:45:47 +0800
Subject: [PATCH] fix: Array out of bounds causes crash handling

---
 src/frame/window/modules/systeminfo/systeminfowidget.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/frame/window/modules/systeminfo/systeminfowidget.cpp b/src/frame/window/modules/systeminfo/systeminfowidget.cpp
index 6313841..0f06271 100644
--- a/src/frame/window/modules/systeminfo/systeminfowidget.cpp
+++ b/src/frame/window/modules/systeminfo/systeminfowidget.cpp
@@ -89,7 +89,7 @@ void SystemInfoWidget::initData()
     if (IsServerSystem) {
         connect(GSettingWatcher::instance(),
                 &GSettingWatcher::requestShowSecondMenu, this, [this](int row) {
-                    if (m_itemList[row].gsettingsName == "editionLicense") {
+                    if (m_itemList.size() > row && m_itemList[row].gsettingsName == "editionLicense") {
                         m_listView->setRowHidden(row, true);
                     }
                 });
-- 
2.20.1

