diff --git a/matchtree.go b/matchtree.go index 1e43ac89f..8e7b9a7a5 100644 --- a/matchtree.go +++ b/matchtree.go @@ -1332,6 +1332,12 @@ func pruneMatchTree(mt matchTree) (matchTree, error) { mt.child, err = pruneMatchTree(mt.child) case *boostMatchTree: mt.child, err = pruneMatchTree(mt.child) + if err != nil { + return nil, err + } + if mt.child == nil { + return nil, nil + } case *andLineMatchTree: child, err := pruneMatchTree(&mt.andMatchTree) if err != nil {