From 24014e779c889caf43bf9e9c29d645e505127743 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sat, 18 Sep 2010 10:35:38 +0100 Subject: xcb: Ensure the XCB connection is valid before using it. --- src/pulse/client-conf-x11.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/pulse') diff --git a/src/pulse/client-conf-x11.c b/src/pulse/client-conf-x11.c index 565f997d..0348a2fd 100644 --- a/src/pulse/client-conf-x11.c +++ b/src/pulse/client-conf-x11.c @@ -55,6 +55,11 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) { goto finish; } + if (xcb_connection_has_error(xcb)) { + pa_log(_("xcb_connection_has_error() returned true")); + goto finish; + } + if (pa_x11_get_prop(xcb, "PULSE_SERVER", t, sizeof(t))) { pa_bool_t disable_autospawn = TRUE; -- cgit