Skip to content

Commit

Permalink
Avoid an assert for empty icon files in the store (should look into t…
Browse files Browse the repository at this point in the history
…his more)
  • Loading branch information
hrydgard committed Jul 20, 2023
1 parent 9c3b9a2 commit a84df89
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion UI/Store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ class HttpImageFileView : public UI::View {
if (download.ResultCode() == 200) {
std::string data;
download.buffer().TakeAll(&data);
g_iconCache.InsertIcon(path_, IconFormat::PNG, std::move(data));
if (!data.empty()) {
g_iconCache.InsertIcon(path_, IconFormat::PNG, std::move(data));
} else {
g_iconCache.Cancel(path_);
}
} else {
g_iconCache.Cancel(path_);
}
Expand Down

0 comments on commit a84df89

Please sign in to comment.