mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-09 02:48:05 +02:00
registry: Deactivate all objects before clearing the registry
This avoids possible shutdown races between registered objects.
This commit is contained in:
parent
93ccf7b22e
commit
91cc2387a3
1 changed files with 7 additions and 0 deletions
|
|
@ -166,6 +166,13 @@ wp_registry_clear (WpRegistry *self)
|
|||
g_clear_pointer (&self->tmp_globals, g_ptr_array_unref);
|
||||
g_clear_pointer (&self->features, g_ptr_array_unref);
|
||||
|
||||
/* make sure all objects are disabled before clearing the registry */
|
||||
for (guint i = 0; i < self->objects->len; i++) {
|
||||
gpointer o = g_ptr_array_index (self->objects, i);
|
||||
if (WP_IS_OBJECT (o))
|
||||
wp_object_deactivate (WP_OBJECT (o), WP_OBJECT_FEATURES_ALL);
|
||||
}
|
||||
|
||||
/* remove all the registered objects
|
||||
this will normally also destroy the object managers, eventually, since
|
||||
they are normally ref'ed by modules, which are registered objects */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue