diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2021-09-30 04:10:22 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-09-30 04:10:22 +0200 |
commit | 2b3ea27bdf4879933d46aba24c457382398c998f (patch) | |
tree | 4bd2162b6fed94d7e33378d267dac744e5d11c96 /tdecore/tdehw | |
parent | f159fa61a972641944adc614d33baf5e52ac5e0e (diff) | |
download | tdelibs-2b3ea27bdf4879933d46aba24c457382398c998f.tar.gz tdelibs-2b3ea27bdf4879933d46aba24c457382398c998f.zip |
tdehwlib: Prevent potential crash, when building without Network Manager support.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdecore/tdehw')
-rw-r--r-- | tdecore/tdehw/tdenetworkconnections.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tdecore/tdehw/tdenetworkconnections.cpp b/tdecore/tdehw/tdenetworkconnections.cpp index 0cf1823a1..0b6405ea3 100644 --- a/tdecore/tdehw/tdenetworkconnections.cpp +++ b/tdecore/tdehw/tdenetworkconnections.cpp @@ -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; + } } } } |