diff --git a/deb/snapshot.go b/deb/snapshot.go index 0aeac4a34..00995e7a1 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 s.packageRefs == nil { + return 0 + } return s.packageRefs.Len() }