tdehwlib: Prevent potential crash, when building without Network Manager support.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/146/head
Slávek Banko 3 years ago
parent f159fa61a9
commit 2b3ea27bdf
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -1104,9 +1104,14 @@ TDENetworkWiFiAPInfo* TDEGlobalNetworkManager::findAccessPointByBSSID(TDEMACAddr
TDENetworkDevice* dev = dynamic_cast<TDENetworkDevice*>(*it);
if (dev) {
TDENetworkConnectionManager* deviceConnMan = dev->connectionManager();
TDENetworkWiFiAPInfo* candidate = deviceConnMan->findAccessPointByBSSID(bssid);
if (candidate) {
ret = candidate;
if (deviceConnMan)
{
TDENetworkWiFiAPInfo* candidate = deviceConnMan->findAccessPointByBSSID(bssid);
if (candidate)
{
ret = candidate;
break;
}
}
}
}

Loading…
Cancel
Save