diff --git a/src/color.c b/src/color.c index 3eb41141..1e965ac1 100644 --- a/src/color.c +++ b/src/color.c @@ -54,8 +54,9 @@ void set_colorpairs(void) for (i = 0; i < NUMBER_OF_ELEMENTS; i++) { bool bright = FALSE; - if (parse_color_names(specified_color_combo[i], - &foreground, &background, &bright)) { + if (specified_color_combo[i] != NULL && + parse_color_names(specified_color_combo[i], + &foreground, &background, &bright)) { if (foreground == -1 && !using_defaults) foreground = COLOR_WHITE; if (background == -1 && !using_defaults) @@ -63,8 +64,7 @@ void set_colorpairs(void) init_pair(i + 1, foreground, background); interface_color_pair[i] = COLOR_PAIR(i + 1) | (bright ? A_BOLD : A_NORMAL); - } - else { + } else { if (i != FUNCTION_TAG) interface_color_pair[i] = hilite_attribute; else