From a94fc024a0d2cd96d7a4899c8bdbe4b62f7040ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20B=C3=B6hlin?= Date: Sun, 24 Mar 2024 11:46:51 +0100 Subject: [PATCH] Fix crash on calling teardown multiple times --- src/node/impl/EspNowNode.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node/impl/EspNowNode.cpp b/src/node/impl/EspNowNode.cpp index b327c6d..6fc7278 100644 --- a/src/node/impl/EspNowNode.cpp +++ b/src/node/impl/EspNowNode.cpp @@ -260,6 +260,7 @@ void EspNowNode::teardown() { esp_wifi_stop(); if (_netif_sta != nullptr) { esp_netif_destroy_default_wifi(_netif_sta); + _netif_sta = nullptr; } esp_event_loop_delete_default(); esp_netif_deinit();