Merge pull request #288 from cucumber/bugfix/empty-feature-nil-pointer

Fixed issue with empty feature file causing nil pointer deref
Этот коммит содержится в:
Fredrik Lönnblad 2020-04-30 14:30:31 +02:00 коммит произвёл GitHub
родитель 64ede2d482 0c864f1400
коммит 8fb7cd9769
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

Просмотреть файл

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