module: remove resource listener in cleanup

Remove the resource listener before destroying the object because that
will trigger the resource cleanup again.
This commit is contained in:
Wim Taymans 2018-09-24 09:30:14 +02:00
parent 8a88c6da53
commit 8a562c4427
2 changed files with 2 additions and 0 deletions

View file

@ -64,6 +64,7 @@ struct node_data {
static void resource_destroy(void *data)
{
struct node_data *nd = data;
spa_hook_remove(&nd->resource_listener);
if (nd->dsp)
pw_node_destroy(nd->dsp);
}