From 421a15939dba9728decc813f0a20a386708059aa Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 13 Oct 2020 10:19:02 +0200 Subject: [PATCH] pulse: clear global on the stream when destroyed --- pipewire-pulseaudio/src/context.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pipewire-pulseaudio/src/context.c b/pipewire-pulseaudio/src/context.c index 771f8f3a9..693a3bea2 100644 --- a/pipewire-pulseaudio/src/context.c +++ b/pipewire-pulseaudio/src/context.c @@ -50,9 +50,10 @@ static void global_free(pa_context *c, struct global *g) if (g->ginfo && g->ginfo->destroy) g->ginfo->destroy(g); - if (g->proxy) { + if (g->stream) + g->stream->global = NULL; + if (g->proxy) pw_proxy_destroy(g->proxy); - } if (g->props) pw_properties_free(g->props); free(g->type);