diff options
Diffstat (limited to 'grep.c')
-rw-r--r-- | grep.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -192,7 +192,8 @@ void compile_grep_patterns(struct grep_opt *opt) * A classic recursive descent parser would do. */ p = opt->pattern_list; - opt->pattern_expression = compile_pattern_expr(&p); + if (p) + opt->pattern_expression = compile_pattern_expr(&p); if (p) die("incomplete pattern expression: %s", p->pattern); } |