From 599f1d47441652afef78421ab465d256995a09f5 Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Tue, 20 Jun 2023 17:17:07 +0800 Subject: [PATCH] =?UTF-8?q?getDeviceConnectivity=20=E5=A2=9E=E5=8A=A0devic?= =?UTF-8?q?e=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/dbus-interface/kylinnetworkdeviceresource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/dbus-interface/kylinnetworkdeviceresource.cpp b/src/backend/dbus-interface/kylinnetworkdeviceresource.cpp index 12280e9b..61942694 100644 --- a/src/backend/dbus-interface/kylinnetworkdeviceresource.cpp +++ b/src/backend/dbus-interface/kylinnetworkdeviceresource.cpp @@ -256,7 +256,7 @@ void KyNetworkDeviceResourse::getDeviceConnectivity(const QString &deviceName, N QString dbusPath; NetworkManager::Device::Ptr connectDevice = m_networkResourceInstance->findDeviceInterface(deviceName); - if (connectDevice->isValid()) { + if (connectDevice != nullptr && connectDevice->isValid()) { dbusPath = connectDevice->uni(); } else { qWarning() << "[KyNetworkDeviceResourse] can not find device " << deviceName;