projects
/
suckless
/
dwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f315832
)
added slight error check to getcolor
author
arg@mmvi
<unknown>
Tue, 26 Sep 2006 11:49:16 +0000
(13:49 +0200)
committer
arg@mmvi
<unknown>
Tue, 26 Sep 2006 11:49:16 +0000
(13:49 +0200)
draw.c
patch
|
blob
|
history
diff --git
a/draw.c
b/draw.c
index 3fbac5bd0e0c48de138de660310e44a7e67fef3c..362d025e65b6370424e86394ee30c981f5b048e5 100644
(file)
--- 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;
}