From 0378819c54ba2e6d1ec5ed573e9c146751a1bfc4 Mon Sep 17 00:00:00 2001 From: jannfis Date: Mon, 16 Mar 2020 17:43:44 +0100 Subject: [PATCH] Test for nil to prevent nil pointer dereference (#3237) --- controller/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/state.go b/controller/state.go index e3224e0034..29fd103187 100644 --- a/controller/state.go +++ b/controller/state.go @@ -166,7 +166,7 @@ func unmarshalManifests(manifests []string) ([]*unstructured.Unstructured, []*un if err != nil { return nil, nil, err } - if ignore.Ignore(obj) { + if obj == nil || ignore.Ignore(obj) { continue } if hookutil.IsHook(obj) {