mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-09 07:28:41 +02:00
endpoint: ref the endpoint while unregistering
The core may be the last object holding a reference to the endpoint, so the unregister call may destroy it.
This commit is contained in:
parent
eabd2a49a4
commit
45dc9786f4
1 changed files with 2 additions and 0 deletions
|
|
@ -279,8 +279,10 @@ wp_endpoint_unregister (WpEndpoint * self)
|
|||
g_info ("WpEndpoint:%p unregistering '%s' (%s)", self, priv->name,
|
||||
priv->media_class);
|
||||
|
||||
g_object_ref (self);
|
||||
wp_core_remove_global (priv->core, WP_GLOBAL_ENDPOINT, self);
|
||||
priv->core = NULL;
|
||||
g_object_unref (self);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue