diff --git a/src/pattern.c b/src/pattern.c index a6fc52d61..b19ffe273 100644 --- a/src/pattern.c +++ b/src/pattern.c @@ -1308,6 +1308,10 @@ void pat_del_tree_str(struct pattern_expr *expr, struct pat_ref_elt *ref) struct ebmb_node *node, *next_node; struct pattern_tree *elt; + /* If the flag PAT_F_IGNORE_CASE is set, we cannot use trees */ + if (expr->mflags & PAT_MF_IGNORE_CASE) + return pat_del_list_ptr(expr, ref); + /* browse each node of the tree. */ for (node = ebmb_first(&expr->pattern_tree), next_node = node ? ebmb_next(node) : NULL; node;