Fix wpa_supplicant AP mode with WPS not to crash
[libeap.git] / src / ap / wps_hostapd.c
index 7963d60..0b9c2af 100644 (file)
@@ -540,6 +540,8 @@ static int count_interface_cb(struct hostapd_iface *iface, void *ctx)
 static int interface_count(struct hostapd_iface *iface)
 {
        int count = 0;
+       if (iface->for_each_interface == NULL)
+               return 0;
        iface->for_each_interface(iface->interfaces, count_interface_cb,
                                  &count);
        return count;