diff options
Diffstat (limited to 'draw.c')
-rw-r--r-- | draw.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -149,7 +149,8 @@ getcolor(const char *colstr) { Colormap cmap = DefaultColormap(dpy, screen); XColor color; - XAllocNamedColor(dpy, cmap, colstr, &color, &color); + if(!XAllocNamedColor(dpy, cmap, colstr, &color, &color)) + eprint("error, cannot allocate color '%s'\n", colstr); return color.pixel; } |