mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
core: ensure we don't remove and disconnect twice
Check for multiple recursive disconnect calls by checking the flags before calling the pw_proxy methods. This ensure that calling disconnect from one of the proxy removed callbacks does not trigger another disconnect later on.
This commit is contained in:
parent
6fc9914431
commit
d321e9b93e
1 changed files with 4 additions and 2 deletions
|
|
@ -479,7 +479,9 @@ SPA_EXPORT
|
|||
int pw_core_disconnect(struct pw_core *core)
|
||||
{
|
||||
pw_log_debug("%p: disconnect", core);
|
||||
pw_proxy_remove(&core->proxy);
|
||||
pw_proxy_destroy(&core->proxy);
|
||||
if (!core->removed)
|
||||
pw_proxy_remove(&core->proxy);
|
||||
if (!core->destroyed)
|
||||
pw_proxy_destroy(&core->proxy);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue