Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Added tag 1.7 for changeset 4dbdb61c8b8ce21dee5c7050a6b103855964ed20
[dwm.git]
/
draw.c
diff --git
a/draw.c
b/draw.c
index
3fbac5b
..
362d025
100644
(file)
--- a/
draw.c
+++ b/
draw.c
@@
-149,7
+149,8
@@
getcolor(const char *colstr) {
Colormap cmap = DefaultColormap(dpy, screen);
XColor color;
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;
}
return color.pixel;
}