Skip to content

Commit

Permalink
handle packageRefs == nil
Browse files Browse the repository at this point in the history
  • Loading branch information
neolynx committed Jul 31, 2024
1 parent 0c066e2 commit e826115
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deb/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit e826115

Please sign in to comment.