Skip to content

Commit

Permalink
Fix nil pointer panic (gardener#7908)
Browse files Browse the repository at this point in the history
  • Loading branch information
acumino authored May 10, 2023
1 parent edc9b33 commit 828adfe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (a *Actuator) ExecuteHealthCheckFunctions(ctx context.Context, log logr.Log

healthCheckResult, err := check.Check(ctx, request)

if errorCodeCheckFunc != nil {
if healthCheckResult != nil && errorCodeCheckFunc != nil {
healthCheckResult.Codes = append(healthCheckResult.Codes, errorCodeCheckFunc(fmt.Errorf("%s", healthCheckResult.Detail))...)
}

Expand Down

0 comments on commit 828adfe

Please sign in to comment.