i3-config-wizard: correctly check for errors when connecting to X11
This commit is contained in:
parent
f84264ae41
commit
2a43a49595
|
@ -427,8 +427,8 @@ int main(int argc, char *argv[]) {
|
||||||
socket_path = "/tmp/i3-ipc.sock";
|
socket_path = "/tmp/i3-ipc.sock";
|
||||||
|
|
||||||
int screens;
|
int screens;
|
||||||
conn = xcb_connect(NULL, &screens);
|
if ((conn = xcb_connect(NULL, &screens)) == NULL ||
|
||||||
if (xcb_connection_has_error(conn))
|
xcb_connection_has_error(conn))
|
||||||
errx(1, "Cannot open display\n");
|
errx(1, "Cannot open display\n");
|
||||||
|
|
||||||
xcb_screen_t *root_screen = xcb_aux_get_screen(conn, screens);
|
xcb_screen_t *root_screen = xcb_aux_get_screen(conn, screens);
|
||||||
|
|
Loading…
Reference in New Issue