summaryrefslogtreecommitdiff
path: root/xlsclients.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-10-20 16:20:18 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-10-21 12:53:34 -0700
commit9745fd920083438ef2c1566947f179b105bf8deb (patch)
tree59a46ba9a6c6fa4582711100685856a069792829 /xlsclients.c
parent222dc9735d6fd2ab1b22003eb00348b98b87afe7 (diff)
Fix check for xcb_connect failure
Prevents core dump when display can't be opened Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Diffstat (limited to 'xlsclients.c')
-rw-r--r--xlsclients.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlsclients.c b/xlsclients.c
index 2fd0c2b..3a34865 100644
--- a/xlsclients.c
+++ b/xlsclients.c
@@ -189,7 +189,7 @@ main(int argc, char *argv[])
}
dpy = xcb_connect(displayname, &screen_number);
- if (!dpy) {
+ if (xcb_connection_has_error(dpy)) {
char *name = displayname;
if (!name)
name = getenv("DISPLAY");