mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
fix cleanup
When the node is destroyed, remove it from the node list and mark the reference to the node gone so that when the resource is cleaned up we don't try to destroy the node again.
This commit is contained in:
parent
3d1acf3032
commit
b50482e346
2 changed files with 4 additions and 10 deletions
|
|
@ -57,12 +57,8 @@ struct link_data {
|
|||
static void resource_destroy(void *data)
|
||||
{
|
||||
struct link_data *ld = data;
|
||||
spa_list_remove(&ld->l);
|
||||
spa_hook_remove(&ld->resource_listener);
|
||||
if (ld->link) {
|
||||
spa_hook_remove(&ld->link_listener);
|
||||
if (ld->link)
|
||||
pw_link_destroy(ld->link);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct pw_resource_events resource_events = {
|
||||
|
|
@ -73,6 +69,7 @@ static const struct pw_resource_events resource_events = {
|
|||
static void link_destroy(void *data)
|
||||
{
|
||||
struct link_data *ld = data;
|
||||
spa_list_remove(&ld->l);
|
||||
ld->link = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue