aewl
changeset 495:3a812750f983
added slight error check to getcolor
author | arg@mmvi |
---|---|
date | Tue, 26 Sep 2006 13:49:16 +0200 |
parents | 36f9bb3da949 |
children | 202416b41e80 |
files | draw.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line diff
1.1 --- a/draw.c Tue Sep 26 13:30:30 2006 +0200 1.2 +++ b/draw.c Tue Sep 26 13:49:16 2006 +0200 1.3 @@ -149,7 +149,8 @@ 1.4 Colormap cmap = DefaultColormap(dpy, screen); 1.5 XColor color; 1.6 1.7 - XAllocNamedColor(dpy, cmap, colstr, &color, &color); 1.8 + if(!XAllocNamedColor(dpy, cmap, colstr, &color, &color)) 1.9 + eprint("error, cannot allocate color '%s'\n", colstr); 1.10 return color.pixel; 1.11 } 1.12