diff --git a/CHANGELOG.md b/CHANGELOG.md index 20dd8fef4..63bea0fb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ All notable changes to this project will be documented in this file. - LVGL restore `lv_palette` functions - IPv6 support in safeboot - LVGL fix memory allocation of flush buffers +- Berry `web_add_handler` called before `Webserver` is initialized ### Removed - LVGL disabled vector graphics diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino index 78e2a097a..2205b214f 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino @@ -899,7 +899,7 @@ bool Xdrv52(uint32_t function) #ifdef USE_ETHERNET network_up = network_up || EthernetHasIP(); #endif - if (network_up) { // if network is already up, send a synthetic event to trigger web handlers + if (network_up && (Webserver != NULL)) { // if network is already up, send a synthetic event to trigger web handlers callBerryEventDispatcher(PSTR("web_add_handler"), nullptr, 0, nullptr); berry.web_add_handler_done = true; }