aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-11-18 14:32:37 +0100
committerMattias Andrée <maandree@kth.se>2017-11-18 14:32:37 +0100
commit7d85639cc46e28dfed4df1d91691ca53cacec5e6 (patch)
treebd1dcce984616917c16cf455613049da1cb4a803 /src/lib
parentUpdate TODO (diff)
downloadlibgamma-7d85639cc46e28dfed4df1d91691ca53cacec5e6.tar.gz
libgamma-7d85639cc46e28dfed4df1d91691ca53cacec5e6.tar.bz2
libgamma-7d85639cc46e28dfed4df1d91691ca53cacec5e6.tar.xz
X RAndR: Fix connection failure detection
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/lib/gamma-x-randr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/gamma-x-randr.c b/src/lib/gamma-x-randr.c
index 9e8a8a0..fb002fc 100644
--- a/src/lib/gamma-x-randr.c
+++ b/src/lib/gamma-x-randr.c
@@ -195,7 +195,7 @@ int libgamma_x_randr_site_initialise(libgamma_site_state_t* restrict this,
/* Connect to the display server. */
this->data = connection = xcb_connect(site, NULL);
- if (connection == NULL)
+ if (connection == NULL || xcb_connection_has_error(connection))
return LIBGAMMA_OPEN_SITE_FAILED;
/* Query the version of the X RandR extension protocol. */