From 0c864f14001427a9e14158c7975bd96708ab9f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20L=C3=B6nnblad?= Date: Thu, 30 Apr 2020 11:15:40 +0200 Subject: [PATCH] Fixed issue with empty feature file causing nil pointer deref --- suite.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/suite.go b/suite.go index 5c79a74..0666778 100644 --- a/suite.go +++ b/suite.go @@ -748,7 +748,10 @@ func (s sortByOrderGiven) Swap(i, j int) { s[i], s[j] = s[j], s[i] } func filterFeatures(tags string, collected map[string]*feature) (features []*feature) { for _, ft := range collected { applyTagFilter(tags, ft) - features = append(features, ft) + + if ft.Feature != nil { + features = append(features, ft) + } } sort.Sort(sortByOrderGiven(features))