diff options
author | Colin Guthrie <cguthrie@mandriva.org> | 2010-09-18 10:35:38 +0100 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2010-09-18 10:35:38 +0100 |
commit | 2c564f2e9e6a02def7cdfe03efa70a717c91aa5b (patch) | |
tree | c9f4be406290e95cb395e40d058edf869c222496 /src/pulse | |
parent | eef247b57e97841525a89c26f1eb35c52bf1af9e (diff) |
xcb: Ensure the XCB connection is valid before using it.
Diffstat (limited to 'src/pulse')
-rw-r--r-- | src/pulse/client-conf-x11.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; |