summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-11 19:00:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-11 21:11:37 (GMT)
commit451d36bb25e1832dbe66b799f6526daa0b637d26 (patch)
tree7d644716669ce89144f9b4071f981d1fae7b8ee0
parent180483c5c94a37c9fe304dded99d3db56d2d2b38 (diff)
downloadgit-451d36bb25e1832dbe66b799f6526daa0b637d26.zip
git-451d36bb25e1832dbe66b799f6526daa0b637d26.tar.gz
git-451d36bb25e1832dbe66b799f6526daa0b637d26.tar.bz2
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>
-rw-r--r--wt-status.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wt-status.c b/wt-status.c
index c0c2472..bfd1b0f 100644
--- a/wt-status.c
+++ b/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;
}