Skip to content

Commit

Permalink
fix: nil pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
alanshaw committed Oct 28, 2024
1 parent eb70925 commit 2673f2d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/result/failure/faillure.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ type failure struct {
}

func (f failure) Name() string {
if f.model.Name == nil {
return ""
}
return *f.model.Name
}

Expand All @@ -85,6 +88,9 @@ func (f failure) Error() string {
}

func (f failure) Stack() string {
if f.model.Stack == nil {
return ""
}
return *f.model.Stack
}

Expand Down

0 comments on commit 2673f2d

Please sign in to comment.