mirror of
https://github.com/esphome/esphome.git
synced 2025-01-18 20:10:55 +00:00
Early return when there are no wifi scan results (#5797)
This commit is contained in:
parent
cf6b56c1ac
commit
e7038d077a
@ -686,6 +686,11 @@ void WiFiComponent::wifi_process_event_(IDFWiFiEvent *data) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (it.number == 0) {
|
||||
// no results
|
||||
return;
|
||||
}
|
||||
|
||||
uint16_t number = it.number;
|
||||
std::vector<wifi_ap_record_t> records(number);
|
||||
err = esp_wifi_scan_get_ap_records(&number, records.data());
|
||||
|
Loading…
x
Reference in New Issue
Block a user