Berry web_add_handler called before Webserver is initialized (#21272)

This commit is contained in:
s-hadinger 2024-04-25 09:08:24 +02:00 committed by GitHub
parent 582ca598f0
commit 469492a41a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ All notable changes to this project will be documented in this file.
- LVGL restore `lv_palette` functions - LVGL restore `lv_palette` functions
- IPv6 support in safeboot - IPv6 support in safeboot
- LVGL fix memory allocation of flush buffers - LVGL fix memory allocation of flush buffers
- Berry `web_add_handler` called before `Webserver` is initialized
### Removed ### Removed
- LVGL disabled vector graphics - LVGL disabled vector graphics

View File

@ -899,7 +899,7 @@ bool Xdrv52(uint32_t function)
#ifdef USE_ETHERNET #ifdef USE_ETHERNET
network_up = network_up || EthernetHasIP(); network_up = network_up || EthernetHasIP();
#endif #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); callBerryEventDispatcher(PSTR("web_add_handler"), nullptr, 0, nullptr);
berry.web_add_handler_done = true; berry.web_add_handler_done = true;
} }