mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -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
52852f66cb
commit
0da4afca76
1 changed files with 2 additions and 1 deletions
|
|
@ -921,7 +921,8 @@ static int impl_clear(struct spa_handle *handle)
|
|||
|
||||
for (i = 0; i < MAX_PORTS; i++)
|
||||
free(this->in_ports[i]);
|
||||
mix_ops_free(&this->ops);
|
||||
if (this->ops.free)
|
||||
mix_ops_free(&this->ops);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue