Permalink
Browse files

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>
  • Loading branch information...
1 parent 180483c commit 451d36bb25e1832dbe66b799f6526daa0b637d26 @gitster gitster committed Feb 11, 2008
Showing with 2 additions and 0 deletions.
  1. +2 −0 wt-status.c
View
2 wt-status.c
@@ -402,6 +402,8 @@ int git_status_config(const char *k, const char *v)
}
if (!prefixcmp(k, "status.color.") || !prefixcmp(k, "color.status.")) {
int slot = parse_status_slot(k, 13);
+ if (!v)
+ return config_error_nonbool(k);
color_parse(v, k, wt_status_colors[slot]);
return 0;
}

0 comments on commit 451d36b

Please sign in to comment.