From: Michael Stapelberg Date: Thu, 11 Jun 2009 01:30:26 +0000 (+0200) Subject: Add a proper error message if connection to the X server can’t be established X-Git-Tag: 3.b~66 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=55f0aa8f28c156562156782a3080f073f6aae5e2;p=i3%2Fi3 Add a proper error message if connection to the X server can’t be established --- diff --git a/src/mainx.c b/src/mainx.c index c0fb6581..cadd5125 100644 --- a/src/mainx.c +++ b/src/mainx.c @@ -144,6 +144,9 @@ int main(int argc, char *argv[], char *env[]) { conn = xcb_connect(NULL, &screens); + if (xcb_connection_has_error(conn)) + die("Cannot open display\n"); + load_configuration(conn, override_configpath); /* Place requests for the atoms we need as soon as possible */