Skip to content

Commit

Permalink
fix nil point (#7905)
Browse files Browse the repository at this point in the history
Signed-off-by: jomenxiao <jomenxiao@gmail.com>
  • Loading branch information
jomenxiao authored and alexmt committed Dec 16, 2021
1 parent 6da92a8 commit a7e7f32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/appcontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ func (ctrl *ApplicationController) processRequestedAppOperation(app *appv1.Appli
}

ctrl.setOperationState(app, state)
if state.Phase.Completed() && !app.Operation.Sync.DryRun {
if state.Phase.Completed() && (app.Operation.Sync != nil && !app.Operation.Sync.DryRun) {
// if we just completed an operation, force a refresh so that UI will report up-to-date
// sync/health information
if _, err := cache.MetaNamespaceKeyFunc(app); err == nil {
Expand Down

0 comments on commit a7e7f32

Please sign in to comment.