Skip to content

Commit

Permalink
WifiManager: fix crash if no wifi device found (#23701)
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlee authored Feb 3, 2022
1 parent 4715510 commit 4e0c08c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion selfdrive/ui/qt/offroad/wifiManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ uint WifiManager::getAdapterType(const QDBusObjectPath &path) {
}

void WifiManager::requestScan() {
asyncCall(adapter, NM_DBUS_INTERFACE_DEVICE_WIRELESS, "RequestScan", QVariantMap());
if (!adapter.isEmpty()) {
asyncCall(adapter, NM_DBUS_INTERFACE_DEVICE_WIRELESS, "RequestScan", QVariantMap());
}
}

QByteArray WifiManager::get_property(const QString &network_path , const QString &property) {
Expand Down

0 comments on commit 4e0c08c

Please sign in to comment.