There is xcb_connection_has_error to check connection errors, and return value of xcb_connect is always non-NULL.
Signed-off-by: Mikhail Gusarov <[email protected]> --- src/lib/ecore_x/xcb/ecore_xcb.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/lib/ecore_x/xcb/ecore_xcb.c b/src/lib/ecore_x/xcb/ecore_xcb.c index 2eddca8..1404b17 100644 --- a/src/lib/ecore_x/xcb/ecore_xcb.c +++ b/src/lib/ecore_x/xcb/ecore_xcb.c @@ -199,7 +199,8 @@ ecore_x_init(const char *name) return _ecore_xcb_init_count; } _ecore_xcb_conn = xcb_connect(name, &screen); - if (!_ecore_xcb_conn) return 0; + if (xcb_connection_has_error(_ecore_xcb_conn)) + return 0; /* FIXME: no error code right now */ /* _ecore_xcb_error_handler_init(); */ -- 1.6.3.3 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
