From bdb1931876ccf680e6df6ccce636c0897509230e Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 16 Dec 2024 19:01:10 -0600 Subject: [PATCH] Error handling for no source record found --- src/build.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/build.cpp b/src/build.cpp index 278e401..47a3433 100644 --- a/src/build.cpp +++ b/src/build.cpp @@ -157,6 +157,7 @@ void build::set_lp(launchpad* lp_ptr) { } const std::optional build::getCurrentSourcePublication() { + if (current_source_publication_link.empty()) return std::nullopt; auto response = lp->api_get(current_source_publication_link); if (!response) return std::nullopt; auto data = nlohmann::json::parse(response.value());