summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--draw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/draw.c b/draw.c
index 3fbac5b..362d025 100644
--- a/draw.c
+++ b/draw.c
@@ -149,7 +149,8 @@ getcolor(const char *colstr) {
149 Colormap cmap = DefaultColormap(dpy, screen); 149 Colormap cmap = DefaultColormap(dpy, screen);
150 XColor color; 150 XColor color;
151 151
152 XAllocNamedColor(dpy, cmap, colstr, &color, &color); 152 if(!XAllocNamedColor(dpy, cmap, colstr, &color, &color))
153 eprint("error, cannot allocate color '%s'\n", colstr);
153 return color.pixel; 154 return color.pixel;
154} 155}
155 156