diff options
author | Vincent Ambo <tazjin@gmail.com> | 2017-02-08T16·23+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@gmail.com> | 2017-02-08T16·34+0100 |
commit | 756a4c745d111e74c2c673009e14b14b1cd8141f (patch) | |
tree | 07cd1f5f9df6a3cc534f9fcb79a290579e25fdd4 | |
parent | bace4dd895ac0bcb29388c64f3711de114e36765 (diff) |
fix templater: Guard against empty parent reference
-rw-r--r-- | templater/templater.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templater/templater.go b/templater/templater.go index 29079eb9425e..89d66ff38517 100644 --- a/templater/templater.go +++ b/templater/templater.go @@ -143,7 +143,7 @@ func applyLimits(rs *[]context.ResourceSet, include *[]string, exclude *[]string // Check whether an include/exclude string slice matches a resource set func matchesResourceSet(s *[]string, rs *context.ResourceSet) bool { for _, r := range *s { - if r == rs.Name || r == *rs.Parent { + if r == rs.Name || (rs.Parent != nil && r == *rs.Parent) { return true } } |