From d284a9c6a31969b42dd5ced6993f60739af8da00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Roth?= Date: Thu, 20 Jun 2024 09:39:21 +0200 Subject: [PATCH] handle packageRefs == nil --- deb/snapshot.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deb/snapshot.go b/deb/snapshot.go index 0aeac4a34..b2499aaef 100644 --- a/deb/snapshot.go +++ b/deb/snapshot.go @@ -114,6 +114,9 @@ func (s *Snapshot) String() string { // NumPackages returns number of packages in snapshot func (s *Snapshot) NumPackages() int { + if repo.packageRefs == nil { + return 0 + } return s.packageRefs.Len() }