aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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?
{