summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/polyp/context.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/polyp/context.c b/src/polyp/context.c
index 2cb9e7e3..63acf19f 100644
--- a/src/polyp/context.c
+++ b/src/polyp/context.c
@@ -624,6 +624,7 @@ int pa_context_connect(
PA_CHECK_VALIDITY(c, c->state == PA_CONTEXT_UNCONNECTED, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY(c, !(flags & ~PA_CONTEXT_NOAUTOSPAWN), PA_ERR_INVALID);
+ PA_CHECK_VALIDITY(c, !server || *server, PA_ERR_INVALID);
if (!server)
server = c->conf->default_server;