diff options
author | Peter Harris <peter.harris@hummingbird.com> | 2008-11-29 12:26:46 -0500 |
---|---|---|
committer | Arnaud Fontaine <arnau@debian.org> | 2010-11-14 19:51:10 +0900 |
commit | 3ea3d2816452896dc62d0e6838e8c421805a533d (patch) | |
tree | d0708676e2eb470702c1f6e96e4930ca0674ee27 | |
parent | b73811ede8e84896a202cd15121e0ed62d7143d0 (diff) |
Don't call exit() in xcb_aux_get_depth; return 0 instead.
-rw-r--r-- | aux/xcb_aux.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/aux/xcb_aux.c b/aux/xcb_aux.c index cc96a62..1adc02a 100644 --- a/aux/xcb_aux.c +++ b/aux/xcb_aux.c @@ -44,18 +44,15 @@ xcb_aux_get_depth (xcb_connection_t *c, { xcb_drawable_t drawable; xcb_get_geometry_reply_t *geom; - int depth; + int depth = 0; drawable = screen->root; geom = xcb_get_geometry_reply (c, xcb_get_geometry(c, drawable), 0); - if (!geom) { - perror ("GetGeometry(root) failed"); - exit (0); + if (geom) { + depth = geom->depth; + free (geom); } - - depth = geom->depth; - free (geom); return depth; } |