getDeviceConnectivity 增加device判空
This commit is contained in:
parent
8c406d4f5d
commit
599f1d4744
|
@ -256,7 +256,7 @@ void KyNetworkDeviceResourse::getDeviceConnectivity(const QString &deviceName, N
|
||||||
QString dbusPath;
|
QString dbusPath;
|
||||||
NetworkManager::Device::Ptr connectDevice =
|
NetworkManager::Device::Ptr connectDevice =
|
||||||
m_networkResourceInstance->findDeviceInterface(deviceName);
|
m_networkResourceInstance->findDeviceInterface(deviceName);
|
||||||
if (connectDevice->isValid()) {
|
if (connectDevice != nullptr && connectDevice->isValid()) {
|
||||||
dbusPath = connectDevice->uni();
|
dbusPath = connectDevice->uni();
|
||||||
} else {
|
} else {
|
||||||
qWarning() << "[KyNetworkDeviceResourse] can not find device " << deviceName;
|
qWarning() << "[KyNetworkDeviceResourse] can not find device " << deviceName;
|
||||||
|
|
Loading…
Reference in New Issue