Skip to content

Commit

Permalink
fix: re-added the id check
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaskowicz1 committed Oct 19, 2023
1 parent ce575fb commit 74abd25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dpp/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ application& application::fill_from_json_impl(nlohmann::json* j) {
}

std::string application::get_cover_image_url(uint16_t size, const image_type format) const {
if (!this->cover_image.to_string().empty()) {
if (!this->cover_image.to_string().empty() && this->id) {
return utility::cdn_endpoint_url({ i_jpg, i_png, i_webp },
"app-icons/" + std::to_string(this->id) + "/" + this->cover_image.to_string(),
format, size);
Expand All @@ -158,7 +158,7 @@ std::string application::get_cover_image_url(uint16_t size, const image_type for
}

std::string application::get_icon_url(uint16_t size, const image_type format) const {
if (!this->icon.to_string().empty()) {
if (!this->icon.to_string().empty() && this->id) {
return utility::cdn_endpoint_url({ i_jpg, i_png, i_webp },
"app-icons/" + std::to_string(this->id) + "/" + this->icon.to_string(),
format, size);
Expand Down

0 comments on commit 74abd25

Please sign in to comment.