From b6c86dfa00c789a88307d9c5ae3138ea4708b713 Mon Sep 17 00:00:00 2001 From: InfiniteYuan Date: Wed, 25 Nov 2020 15:41:31 +0800 Subject: [PATCH] bugfix: Delete local variables to avoid null global variables --- .../ble_mesh_wifi_coexist/components/iperf/cmd_wifi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/cmd_wifi.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/cmd_wifi.c index 28548c1ec3..a27f6ba8ef 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/cmd_wifi.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/cmd_wifi.c @@ -129,9 +129,9 @@ void initialise_wifi(void) ESP_ERROR_CHECK(esp_netif_init()); wifi_event_group = xEventGroupCreate(); ESP_ERROR_CHECK(esp_event_loop_create_default()); - esp_netif_t *sta_netif = esp_netif_create_default_wifi_sta(); + sta_netif = esp_netif_create_default_wifi_sta(); assert(sta_netif); - esp_netif_t *ap_netif = esp_netif_create_default_wifi_ap(); + ap_netif = esp_netif_create_default_wifi_ap(); assert(ap_netif); ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &wifi_event_handler, NULL)); ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &ip_event_handler, NULL));