Skip to content

Commit

Permalink
rhel: check before dereferencing record.Distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
hdonnay committed Mar 4, 2020
1 parent ee72da6 commit ad81962
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rhel/matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ func (*Matcher) Name() string {

// Filter implements driver.Matcher.
func (*Matcher) Filter(record *claircore.IndexRecord) bool {
return record.Distribution.DID == "rhel"
return record.Distribution != nil &&
record.Distribution.DID == "rhel"
}

// Query implements driver.Matcher.
Expand Down

0 comments on commit ad81962

Please sign in to comment.