From bc35221210452da2622eb2d8073cd6efb16b7006 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 30 Sep 2020 12:01:46 +0200 Subject: [PATCH] context: destroy clients first Destroy clients before trying to remove nodes. If the clients are still connected they might try to react to the removed nodes. --- src/pipewire/context.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pipewire/context.c b/src/pipewire/context.c index 41c9d01ec..4a15f7324 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -347,6 +347,7 @@ void pw_context_destroy(struct pw_context *context) { struct impl *impl = SPA_CONTAINER_OF(context, struct impl, this); struct pw_global *global; + struct pw_impl_client *client; struct pw_impl_module *module; struct pw_impl_device *device; struct pw_core *core; @@ -361,6 +362,9 @@ void pw_context_destroy(struct pw_context *context) spa_list_consume(core, &context->core_list, link) pw_core_disconnect(core); + spa_list_consume(client, &context->client_list, link) + pw_impl_client_destroy(client); + spa_list_consume(node, &context->node_list, link) pw_impl_node_destroy(node);