From: Michele Ballabio Date: Wed, 18 Mar 2009 20:53:27 GMT Subject: [PATCH v2] git log: avoid segfault with --all-match Message-ID: <1237409607-4169-1-git-send-email-barra_cuda@katamail.com> In-Reply-To: <7vbpryfzpb.fsf@gitster.siamese.dyndns.org> Avoid a segfault when the command git log --all-match was issued, by ignoring the option. Signed-off-by: Michele Ballabio --- grep.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/grep.c b/grep.c index 062b2b6..cb4666d 100644 --- a/grep.c +++ b/grep.c @@ -190,7 +190,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); } -- 1.6.2.22.gc2ac