summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pulse/client-conf-x11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pulse/client-conf-x11.c b/src/pulse/client-conf-x11.c
index b5ac8d9f..e8de9553 100644
--- a/src/pulse/client-conf-x11.c
+++ b/src/pulse/client-conf-x11.c
@@ -44,7 +44,7 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) {
int ret = -1;
char t[1024];
- if (!dname && !getenv("DISPLAY"))
+ if (!dname && (!(dname = getenv("DISPLAY")) || *dname == '\0'))
goto finish;
if (!(d = XOpenDisplay(dname))) {