diff options
| -rw-r--r-- | ui-curses.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui-curses.c b/ui-curses.c index eb6acff..66f7828 100644 --- a/ui-curses.c +++ b/ui-curses.c @@ -421,6 +421,8 @@ static int color_find_rgb(unsigned char r, unsigned char g, unsigned char b) /* Convert color from string. */ static int color_fromstring(const char *s) { + if (!s) + return -1; if (*s == '#' && strlen(s) == 7) { const char *cp; unsigned char r, g, b; |
