Skip to content

Commit

Permalink
Fixed nil pointer dereference.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchell-as committed Dec 12, 2023
1 parent 382363b commit 898c403
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/runbits/runtime/rationalize.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import (
)

func rationalizeError(auth *authentication.Auth, proj *project.Project, rerr *error) {
if rerr == nil {
return nil

Check failure on line 19 in internal/runbits/runtime/rationalize.go

View workflow job for this annotation

GitHub Actions / macos-11

too many return values

Check failure on line 19 in internal/runbits/runtime/rationalize.go

View workflow job for this annotation

GitHub Actions / macos-11

too many return values

Check failure on line 19 in internal/runbits/runtime/rationalize.go

View workflow job for this annotation

GitHub Actions / ubuntu-20.04

too many return values

Check failure on line 19 in internal/runbits/runtime/rationalize.go

View workflow job for this annotation

GitHub Actions / ubuntu-20.04

too many return values
}
var errNoMatchingPlatform *model.ErrNoMatchingPlatform
var errArtifactSetup *setup.ArtifactSetupErrors

isUpdateErr := errs.Matches(*rerr, &ErrUpdate{})
switch {
case rerr == nil:
return

case proj == nil:
multilog.Error("runtime:rationalizeError called with nil project, error: %s", errs.JoinMessage(*rerr))
*rerr = errs.Pack(*rerr, errs.New("project is nil"))
Expand Down

0 comments on commit 898c403

Please sign in to comment.