ecore_x/xcb: Do not segfault if unable to connect to display

There is xcb_connection_has_error to check connection errors,
and return value of xcb_connect is always non-NULL.

SVN revision: 45088
This commit is contained in:
Mikhail Gusarov 2010-01-13 20:24:48 +00:00
parent 5d754e74e7
commit 513a9dab25
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ ecore_x_init(const char *name)
return --_ecore_xcb_init_count;
}
_ecore_xcb_conn = xcb_connect(name, &screen);
if (!_ecore_xcb_conn) {
if (xcb_connection_has_error(_ecore_xcb_conn)) {
eina_log_domain_unregister(_ecore_x11xcb_log_dom);
_ecore_x11xcb_log_dom = -1;
return --_ecore_xcb_init_count;