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:
parent
4a251f5883
commit
c8c5105c1d
|
@ -304,8 +304,8 @@ hostx_init(void)
|
||||||
| XCB_EVENT_MASK_STRUCTURE_NOTIFY;
|
| XCB_EVENT_MASK_STRUCTURE_NOTIFY;
|
||||||
|
|
||||||
EPHYR_DBG("mark");
|
EPHYR_DBG("mark");
|
||||||
|
HostX.conn = xcb_connect(NULL, &HostX.screen);
|
||||||
if ((HostX.conn = xcb_connect(NULL, &HostX.screen)) == NULL) {
|
if (xcb_connection_has_error(HostX.conn)) {
|
||||||
fprintf(stderr, "\nXephyr cannot open host display. Is DISPLAY set?\n");
|
fprintf(stderr, "\nXephyr cannot open host display. Is DISPLAY set?\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue