Test for nil to prevent nil pointer dereference (#3237)

This commit is contained in:
jannfis 2020-03-16 17:43:44 +01:00 committed by GitHub
parent bbb925cb63
commit 0378819c54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {