summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/pulse/pulse-connection.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/backends/pulse/pulse-connection.c b/backends/pulse/pulse-connection.c
index 7344d2e..afd1e48 100644
--- a/backends/pulse/pulse-connection.c
+++ b/backends/pulse/pulse-connection.c
@@ -502,7 +502,8 @@ pulse_connection_disconnect (PulseConnection *connection)
if (connection->priv->state == PULSE_CONNECTION_DISCONNECTED)
return;
- pa_context_unref (connection->priv->context);
+ if (connection->priv->context)
+ pa_context_unref (connection->priv->context);
connection->priv->context = NULL;
connection->priv->outstanding = 0;