Fixed issue with empty feature file causing nil pointer deref

Этот коммит содержится в:
Fredrik Lönnblad 2020-04-30 11:15:40 +02:00
родитель 64ede2d482
коммит 0c864f1400

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

@ -748,8 +748,11 @@ 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)
if ft.Feature != nil {
features = append(features, ft)
}
}
sort.Sort(sortByOrderGiven(features))