Skip to content

Commit bfac2ce

Browse files
committed
fixing nil pointer issue
1 parent c4f0550 commit bfac2ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

utils/formats/sarifutils/sarifutils.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ func GetResultIssueId(result *sarif.Result) (issueId string) {
6767
}
6868

6969
func GetResultFailPrValue(result *sarif.Result) (failPr bool) {
70+
if result == nil || result.Properties == nil {
71+
return
72+
}
7073
if failPrProperty, ok := result.Properties.Properties[FailPrSarifPropertyKey]; ok {
7174
if failPrValue, ok := failPrProperty.(bool); ok {
7275
return failPrValue

0 commit comments

Comments
 (0)