Skip to content

Commit

Permalink
fix - panic on nil
Browse files Browse the repository at this point in the history
Fixed the panic by doing a nil check. Fixes #135
  • Loading branch information
naveensrinivasan committed Jan 18, 2021
1 parent c00aa4b commit 33e9189
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions checks/sast.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ func SASTToolInCheckRuns(c checker.Checker) checker.CheckResult {
if err != nil {
return checker.RetryResult(err)
}
if crs == nil {
return checker.InconclusiveResult
}
for _, cr := range crs.CheckRuns {
if cr.GetStatus() != "completed" {
continue
Expand Down

0 comments on commit 33e9189

Please sign in to comment.