From ac7906fdea0b32bbd5fbc42f0569ece1dba2fbd7 Mon Sep 17 00:00:00 2001 From: Alexander Matyushentsev Date: Thu, 4 Apr 2019 17:49:34 -0700 Subject: [PATCH] Issue #1366 - Fix null pointer dereference error in 'argocd app wait' (#1380) --- cmd/argocd/commands/app.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index 4b1cde87f1..f8e5643c16 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -1483,6 +1483,9 @@ const printOpFmtStr = "%-20s%s\n" const defaultCheckTimeoutSeconds = 0 func printOperationResult(opState *argoappv1.OperationState) { + if opState == nil { + return + } if opState.SyncResult != nil { fmt.Printf(printOpFmtStr, "Operation:", "Sync") fmt.Printf(printOpFmtStr, "Sync Revision:", opState.SyncResult.Revision)