about summary refs log tree commit diff stats
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) {
 	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;
 }
 
>77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121