mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-15 07:00:05 -05:00
proxy: don't remove ourselves from a destroyed core
The core will clear (or have cleared) all the proxies.
This commit is contained in:
parent
f724319e8a
commit
3eec3f5abf
2 changed files with 4 additions and 5 deletions
|
|
@ -172,7 +172,6 @@ static int destroy_proxy(void *object, void *data)
|
|||
if (object == NULL)
|
||||
return 0;
|
||||
|
||||
p->core = NULL;
|
||||
if (object != core)
|
||||
pw_proxy_remove(p);
|
||||
|
||||
|
|
@ -198,9 +197,6 @@ static void proxy_core_destroy(void *data)
|
|||
spa_list_for_each_safe(filter, f2, &core->filter_list, link)
|
||||
pw_filter_disconnect(filter);
|
||||
|
||||
pw_protocol_client_disconnect(core->conn);
|
||||
core->client = NULL;
|
||||
|
||||
pw_map_for_each(&core->objects, destroy_proxy, core);
|
||||
pw_map_reset(&core->objects);
|
||||
|
||||
|
|
@ -209,6 +205,9 @@ static void proxy_core_destroy(void *data)
|
|||
spa_list_consume(filter, &core->filter_list, link)
|
||||
pw_filter_destroy(filter);
|
||||
|
||||
pw_protocol_client_disconnect(core->conn);
|
||||
core->client = NULL;
|
||||
|
||||
pw_mempool_destroy(core->pool);
|
||||
|
||||
pw_protocol_client_destroy(core->conn);
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ void pw_proxy_destroy(struct pw_proxy *proxy)
|
|||
}
|
||||
}
|
||||
if (proxy->removed) {
|
||||
if (proxy->core)
|
||||
if (proxy->core && !proxy->core->destroyed)
|
||||
pw_map_remove(&proxy->core->objects, proxy->id);
|
||||
|
||||
pw_proxy_unref(proxy);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue