From 756a4c745d111e74c2c673009e14b14b1cd8141f Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 8 Feb 2017 17:23:34 +0100 Subject: fix templater: Guard against empty parent reference --- templater/templater.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templater') 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 } } -- cgit 1.4.1