help.c: guard config parser from value=NULL

help.format configuration expects a string value

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano 2008-02-11 10:56:26 -08:00
parent e08404a82d
commit b51b2bb4c3

2
help.c
View file

@ -40,6 +40,8 @@ static void parse_help_format(const char *format)
static int git_help_config(const char *var, const char *value)
{
if (!strcmp(var, "help.format")) {
if (!value)
return config_error_nonbool(var);
help_default_format = xstrdup(value);
return 0;
}