]> git.refcnt.org Git - colorize.git/commitdiff
Assert after find_color_entries() returns
authorSteven Schubiger <stsc@refcnt.org>
Fri, 4 Aug 2017 20:51:10 +0000 (22:51 +0200)
committerSteven Schubiger <stsc@refcnt.org>
Fri, 4 Aug 2017 20:51:10 +0000 (22:51 +0200)
colorize.c

index a443368c7b66148842b3b406d143e56826d89381..8e31f5cf53d5f66473a1d75f049bc3d263d2406b 100644 (file)
@@ -694,6 +694,7 @@ process_args (unsigned int arg_cnt, char **arg_strings, char *attr, const struct
       }
 
     find_color_entries (color_names, colors);
+    assert (colors[FOREGROUND] != NULL);
     free_color_names (color_names);
 
     if (!colors[FOREGROUND]->code && colors[BACKGROUND] && colors[BACKGROUND]->code)