diff --git a/debian/changelog b/debian/changelog index f02d28ed..01534794 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +kylin-nm (3.14.0.0+0512-2k11) v101; urgency=medium + + * 修改因有线连接未指定网卡造成VPN托盘崩溃的问题 + + -- zhaoshixu Fri, 21 Oct 2022 16:35:19 +0800 + kylin-nm (3.14.0.0+0512-2k10) v101; urgency=medium * 托盘vpn需求 diff --git a/src/backend/dbus-interface/kylinconnectresource.cpp b/src/backend/dbus-interface/kylinconnectresource.cpp index 3b59d0ad..a2d02a3d 100644 --- a/src/backend/dbus-interface/kylinconnectresource.cpp +++ b/src/backend/dbus-interface/kylinconnectresource.cpp @@ -194,8 +194,10 @@ void KyConnectResourse::getVpnAndVirtualConnections(QList &conn } NetworkManager::Device::Ptr devicePtr = nullptr; devicePtr = m_networkResourceInstance->findDeviceInterface(connectPtr->settings()->interfaceName()); - if (NetworkManager::ConnectionSettings::ConnectionType::Wired == connectPtr->settings()->connectionType() && !devicePtr->udi().startsWith("/sys/devices/virtual/net")) { - continue; + if (NetworkManager::ConnectionSettings::ConnectionType::Wired == connectPtr->settings()->connectionType()) { + if (devicePtr == nullptr || !devicePtr->udi().startsWith("/sys/devices/virtual/net")) { + continue; + } } QString devName = ""; if (!devicePtr.isNull()) {