From 3dd0a0f7851cd3098056c1ee4f24dc25246ad028 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Mon, 30 Sep 2024 15:48:19 +0530 Subject: [PATCH] [ESP32] Handle error when OTA partition is null in ota image processor (#35816) --- src/platform/ESP32/OTAImageProcessorImpl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/ESP32/OTAImageProcessorImpl.cpp b/src/platform/ESP32/OTAImageProcessorImpl.cpp index a35ca9a274ca67..ab27b9c50df0cb 100644 --- a/src/platform/ESP32/OTAImageProcessorImpl.cpp +++ b/src/platform/ESP32/OTAImageProcessorImpl.cpp @@ -297,6 +297,7 @@ void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context) if (imageProcessor->mOTAUpdatePartition == NULL) { ChipLogError(SoftwareUpdate, "OTA partition not found"); + imageProcessor->mDownloader->OnPreparedForDownload(CHIP_ERROR_INTERNAL); return; } #ifdef CONFIG_ENABLE_DELTA_OTA