Skip to content

Commit

Permalink
Add check in case item list is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Mar 7, 2024
1 parent d0f90ad commit 02513fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sming/Libraries/OtaNetwork/src/HttpUpgrader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ void HttpUpgrader::start()

void HttpUpgrader::fetchNextItem()
{
if(currentItem >= items.count()) {
return;
}

auto& it = items[currentItem];
debug_d("Download file:\r\n"
" (%u) %s -> %s @ 0x%X",
Expand Down

0 comments on commit 02513fd

Please sign in to comment.