From c9796f2f53a4ef16f5f5c8f3b7d01bc2ceb11547 Mon Sep 17 00:00:00 2001 From: Peter Harris Date: Sat, 29 Nov 2008 17:26:46 +0000 Subject: Don't call exit() in xcb_aux_get_depth; return 0 instead. --- 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; } -- cgit v0.8.1-24-ge5fb