From 9745fd920083438ef2c1566947f179b105bf8deb Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 20 Oct 2009 16:20:18 -0700 Subject: Fix check for xcb_connect failure Prevents core dump when display can't be opened Signed-off-by: Alan Coopersmith --- xlsclients.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- cgit v1.2.3