diff options
-rw-r--r-- | plugins/wifi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c index dd79cd35..a0cb966a 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -233,6 +233,11 @@ static void reset_autoscan(struct connman_device *device) static void stop_autoscan(struct connman_device *device) { + const struct wifi_data *wifi = connman_device_get_data(device); + + if (wifi == NULL || wifi->autoscan == NULL) + return; + reset_autoscan(device); connman_device_set_scanning(device, FALSE); |