fixed before OTA hook null pointer exception

This commit is contained in:
Bogdan Pilyugin 2023-05-12 16:16:33 +02:00
parent e65b1e3075
commit 959a74252a

View File

@ -180,6 +180,7 @@ esp_err_t my_esp_https_ota(const esp_http_client_config_t *config)
if (need_to_update)
{
ESP_LOGW(TAG, "New firmware has newer build, START update firmware");
if (HookBeforeUpdate != NULL)
HookBeforeUpdate();
int countPackets = 0;
while (1)