From 898c403f73c98c2d5b38190b92336ef738263780 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 12 Dec 2023 14:31:45 -0500 Subject: [PATCH] Fixed nil pointer dereference. --- internal/runbits/runtime/rationalize.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/runbits/runtime/rationalize.go b/internal/runbits/runtime/rationalize.go index 0039f3b159..a0e67ff5aa 100644 --- a/internal/runbits/runtime/rationalize.go +++ b/internal/runbits/runtime/rationalize.go @@ -15,14 +15,14 @@ import ( ) func rationalizeError(auth *authentication.Auth, proj *project.Project, rerr *error) { + if rerr == nil { + return nil + } 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"))