Skip to content

Commit

Permalink
Fix panic caused by nil filter function
Browse files Browse the repository at this point in the history
Make sure we don't add nil to the filter list.

Fixes google#1283
  • Loading branch information
dsrbecky committed Oct 30, 2017
1 parent 4764f77 commit e3a7bdf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gapis/resolve/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ func Events(ctx context.Context, p *path.Events) (*service.Events, error) {
filters := CommandFilters{filter}
for _, e := range extensions.Get() {
if f := e.EventFilter; f != nil {
filters = append(filters, CommandFilter(f(ctx, p)))
if filter := CommandFilter(f(ctx, p)); filter != nil {
filters = append(filters, filter)
}
}
}
filter = filters.All
Expand Down

0 comments on commit e3a7bdf

Please sign in to comment.