Skip to content

Commit

Permalink
wt-status.c: guard config parser from value=NULL
Browse files Browse the repository at this point in the history
status.color.* and color.status.* expect a string value

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
gitster committed Feb 11, 2008
1 parent 180483c commit 451d36b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wt-status.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -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;
} }
Expand Down

0 comments on commit 451d36b

Please sign in to comment.