diff --git a/src/ap/acs.c b/src/ap/acs.c index 0ac05b52a..7ab310f75 100644 --- a/src/ap/acs.c +++ b/src/ap/acs.c @@ -917,7 +917,8 @@ acs_find_ideal_chan_mode(struct hostapd_iface *iface, /* If the AP is in the 5 GHz or 6 GHz band, lets prefer a less * crowded primary channel if one was found in the segment */ - if (iface->current_mode->mode == HOSTAPD_MODE_IEEE80211A && + if (iface->current_mode && + iface->current_mode->mode == HOSTAPD_MODE_IEEE80211A && chan != best) { wpa_printf(MSG_DEBUG, "ACS: promoting channel %d over %d (less interference %Lg/%Lg)",