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() }