Skip to content

Commit

Permalink
Fix nil pointer deref during diff attempt
Browse files Browse the repository at this point in the history
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
  • Loading branch information
hiddeco committed Apr 12, 2023
1 parent 8448b1d commit 32b5d7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controllers/helmrelease_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func (r *HelmReleaseReconciler) reconcileRelease(ctx context.Context,
hr, hasNewState := v2.HelmReleaseAttempted(hr, revision, releaseRevision, valuesChecksum)

// Run diff against current cluster state.
if !hasNewState {
if !hasNewState && rel != nil {
if ok, _ := features.Enabled(features.DetectDrift); ok {
differ := diff.NewDiffer(runtimeClient.NewImpersonator(
r.Client,
Expand Down

0 comments on commit 32b5d7e

Please sign in to comment.