mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-05 14:48:02 +02:00
si-standard-link: fix crash after returning a link error
If one link fails, the activation transition will return, but then other links will continue to call the callback and try to access the now invalid activation transition. With this change, the callback is bound to the lifetime of the transition and will stop being called after the transition returns Fixes #76
This commit is contained in:
parent
9e11aa5b8b
commit
6e67000d5e
1 changed files with 3 additions and 2 deletions
|
|
@ -310,9 +310,10 @@ create_links (WpSiStandardLink * self, WpTransition * transition,
|
|||
|
||||
/* activate to ensure it is created without errors */
|
||||
self->n_async_ops_wait++;
|
||||
wp_object_activate (WP_OBJECT (link),
|
||||
wp_object_activate_closure (WP_OBJECT (link),
|
||||
WP_PIPEWIRE_OBJECT_FEATURES_MINIMAL, NULL,
|
||||
(GAsyncReadyCallback) on_link_activated, transition);
|
||||
g_cclosure_new_object (
|
||||
(GCallback) on_link_activated, G_OBJECT (transition)));
|
||||
}
|
||||
g_variant_iter_free (iter);
|
||||
return self->node_links->len > 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue