mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-03 09:32:02 +00:00
Fix NULL deref in delete_fluid_ladspa_effect() (#963)
This commit is contained in:
parent
2fafca42a1
commit
c1e286629f
1 changed files with 8 additions and 5 deletions
|
@ -1325,13 +1325,16 @@ static void delete_fluid_ladspa_effect(fluid_ladspa_effect_t *effect)
|
|||
* are private to this effect, so we can safely remove them here. Nodes connected
|
||||
* to audio ports might be connected to other effects as well, so we simply remove
|
||||
* any pointers to them from the effect. */
|
||||
for(i = 0; i < effect->desc->PortCount; i++)
|
||||
if(effect->desc != NULL)
|
||||
{
|
||||
node = (fluid_ladspa_node_t *) effect->port_nodes[i];
|
||||
|
||||
if(node && node->type & FLUID_LADSPA_NODE_CONTROL)
|
||||
for(i = 0; i < effect->desc->PortCount; i++)
|
||||
{
|
||||
delete_fluid_ladspa_node(node);
|
||||
node = (fluid_ladspa_node_t *) effect->port_nodes[i];
|
||||
|
||||
if(node && node->type & FLUID_LADSPA_NODE_CONTROL)
|
||||
{
|
||||
delete_fluid_ladspa_node(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue