builtin-config.c: guard config parser from value=NULL
authorJunio C Hamano <gitster@pobox.com>
Mon, 11 Feb 2008 18:48:12 +0000 (10:48 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 11 Feb 2008 21:11:36 +0000 (13:11 -0800)
color configuration variables expect a string value.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-config.c
index e4a12e316648e6b0ab1ee0b424773f3c672c751e..077d8ef2df4ae38d668293cc35810b39e0488f6b 100644 (file)
@@ -168,6 +168,8 @@ static char parsed_color[COLOR_MAXLEN];
 static int git_get_color_config(const char *var, const char *value)
 {
        if (!strcmp(var, get_color_slot)) {
+               if (!value)
+                       config_error_nonbool(var);
                color_parse(value, var, parsed_color);
                get_color_found = 1;
        }