wt-status.c: guard config parser from value=NULL
status.color.* and color.status.* expect a string value Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
180483c5c9
commit
451d36bb25
@ -402,6 +402,8 @@ int git_status_config(const char *k, const char *v)
|
|||||||
}
|
}
|
||||||
if (!prefixcmp(k, "status.color.") || !prefixcmp(k, "color.status.")) {
|
if (!prefixcmp(k, "status.color.") || !prefixcmp(k, "color.status.")) {
|
||||||
int slot = parse_status_slot(k, 13);
|
int slot = parse_status_slot(k, 13);
|
||||||
|
if (!v)
|
||||||
|
return config_error_nonbool(k);
|
||||||
color_parse(v, k, wt_status_colors[slot]);
|
color_parse(v, k, wt_status_colors[slot]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user