mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
audiommixer: only clear mix_ops when initialized
It's possible that the mix_ops was not initialized and then the free pointer is NULL, so check this instead of segfaulting.
This commit is contained in:
parent
4796b3fb95
commit
0310bb5c5c
1 changed files with 2 additions and 1 deletions
|
|
@ -931,6 +931,7 @@ static int impl_clear(struct spa_handle *handle)
|
||||||
free(port);
|
free(port);
|
||||||
}
|
}
|
||||||
spa_list_init(&this->mix_list);
|
spa_list_init(&this->mix_list);
|
||||||
|
if (this->ops.free)
|
||||||
mix_ops_free(&this->ops);
|
mix_ops_free(&this->ops);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue