Browse Source

added slight error check to getcolor

config
arg@mmvi 18 years ago
parent
commit
e81eb46a78
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      draw.c

+ 2
- 1
draw.c View File

@ -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;
}


Loading…
Cancel
Save