diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 89e0b09ea..f57b058f8 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -139,7 +139,7 @@ static struct wpa_bss * wpa_supplicant_get_new_bss( struct wpa_bss *bss = NULL; struct wpa_ssid *ssid = wpa_s->current_ssid; - if (ssid->ssid_len > 0) + if (ssid && ssid->ssid_len > 0) bss = wpa_bss_get(wpa_s, bssid, ssid->ssid, ssid->ssid_len); if (!bss) bss = wpa_bss_get_bssid(wpa_s, bssid);