ephyr: xcb_connect returns an error, not NULL

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Peter Hutterer 2013-10-29 14:33:56 +10:00
parent 4a251f5883
commit c8c5105c1d
1 changed files with 2 additions and 2 deletions

View File

@ -304,8 +304,8 @@ hostx_init(void)
| XCB_EVENT_MASK_STRUCTURE_NOTIFY;
EPHYR_DBG("mark");
if ((HostX.conn = xcb_connect(NULL, &HostX.screen)) == NULL) {
HostX.conn = xcb_connect(NULL, &HostX.screen);
if (xcb_connection_has_error(HostX.conn)) {
fprintf(stderr, "\nXephyr cannot open host display. Is DISPLAY set?\n");
exit(1);
}