diff --git a/src/frontend/tab-pages/wlanpage.cpp b/src/frontend/tab-pages/wlanpage.cpp index 45e8011a..0ada23c5 100644 --- a/src/frontend/tab-pages/wlanpage.cpp +++ b/src/frontend/tab-pages/wlanpage.cpp @@ -812,10 +812,14 @@ void WlanPage::updateWirelessNetArea(QString uuid, QString ssid, QString devName return; } - deleteWirelessItemFormMap(m_activateConnectionItemMap, m_activatedNetListWidget, ssid); - QListWidgetItem *p_activeListWidgetItem = addEmptyItem(m_activatedNetListWidget); - m_activateConnectionItemMap.insert(EMPTY_SSID, p_activeListWidgetItem); - m_activatedNetListWidget->setFixedHeight(p_activeListWidgetItem->sizeHint().height()); + if (m_activateConnectionItemMap.contains(ssid)) { + deleteWirelessItemFormMap(m_activateConnectionItemMap, m_activatedNetListWidget, ssid); + QListWidgetItem *p_activeListWidgetItem = addEmptyItem(m_activatedNetListWidget); + m_activateConnectionItemMap.insert(EMPTY_SSID, p_activeListWidgetItem); + m_activatedNetListWidget->setFixedHeight(p_activeListWidgetItem->sizeHint().height()); + } else { + qDebug() << LOG_FLAG << ssid << "is not in activeconnection map"; + } KyWirelessNetItem wirelessNetItem; bool ret = m_wirelessNetResource->getWifiNetwork(devName, ssid, wirelessNetItem);