From 74abd25d1185de2f1076f94af6e699b3b412dc32 Mon Sep 17 00:00:00 2001 From: Jaskowicz1 Date: Thu, 19 Oct 2023 09:16:06 +0100 Subject: [PATCH] fix: re-added the id check --- src/dpp/application.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dpp/application.cpp b/src/dpp/application.cpp index edd0e0372e..78908a03fe 100644 --- a/src/dpp/application.cpp +++ b/src/dpp/application.cpp @@ -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); @@ -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);