aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-06-26 21:07:32 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-06-26 21:07:32 +0300
commitb472f63d0b0f6f2549d11b196ca1849b106f6ff3 (patch)
treed100a43f9a4fb8d4fbdedec467d21776bf0e8fbd
parente9b480db173a84acb76d632ee5e6e393a5827cdc (diff)
Add some asserts as part of investigation of GH issue #397
-rw-r--r--bpkg/pkg-build.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx
index 6a9ad7d..e355783 100644
--- a/bpkg/pkg-build.cxx
+++ b/bpkg/pkg-build.cxx
@@ -8019,7 +8019,11 @@ namespace bpkg
// Distinguish between the package and archive/directory cases.
//
- const package_location& pl (ap->locations[0]); // Got to have one.
+ assert (!ap->locations.empty ()); // Got to have one.
+
+ const package_location& pl (ap->locations[0]);
+
+ assert (pl.repository_fragment != nullptr);
if (pl.repository_fragment.object_id () != "") // Special root?
{