Commit ccebadb8 authored by Zeeshan Ali's avatar Zeeshan Ali

wifi: Add a NULL check

This fixes the crash when wifi is disabled.
parent 0146197a
......@@ -317,7 +317,7 @@ get_ap_list (GClueWifi *wifi,
}
aps = nm_device_wifi_get_access_points (wifi->priv->wifi_device);
if (aps->len == 0) {
if (aps == NULL || aps->len == 0) {
g_set_error_literal (error,
G_IO_ERROR,
G_IO_ERROR_FAILED,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment