aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wpa_supplicant/wnm_sta.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index 8875d63c..810bf296 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -486,12 +486,11 @@ static int compare_scan_neighbor_results(struct wpa_supplicant *wpa_s,
u8 i, j;
- if (scan_res == NULL || num_neigh_rep == 0)
+ if (scan_res == NULL || num_neigh_rep == 0 || !wpa_s->current_bss)
return 0;
wpa_printf(MSG_DEBUG, "WNM: Current BSS " MACSTR " RSSI %d",
- MAC2STR(wpa_s->bssid),
- wpa_s->current_bss ? wpa_s->current_bss->level : 0);
+ MAC2STR(wpa_s->bssid), wpa_s->current_bss->level);
for (i = 0; i < num_neigh_rep; i++) {
for (j = 0; j < scan_res->num; j++) {