mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 23:11:41 +00:00
return NULL if LADSPA alloc fails
instead of assertion fail
This commit is contained in:
parent
5ac826d0e0
commit
10c4cfa29e
1 changed files with 6 additions and 2 deletions
|
@ -40,9 +40,13 @@
|
|||
#define L(x);
|
||||
|
||||
fluid_LADSPA_FxUnit_t* new_fluid_LADSPA_FxUnit(fluid_synth_t* synth){
|
||||
if(synth == NULL)
|
||||
return NULL;
|
||||
|
||||
fluid_LADSPA_FxUnit_t* FxUnit=FLUID_NEW(fluid_LADSPA_FxUnit_t);
|
||||
assert(FxUnit);
|
||||
assert(synth);
|
||||
if(FxUnit == NULL)
|
||||
return NULL;
|
||||
|
||||
/* The default state is 'bypassed'. The Fx unit has to be turned on explicitly by the user. */
|
||||
/* Those settings have to be done in order to allow fluid_LADSPA_clean. */
|
||||
FxUnit->Bypass=fluid_LADSPA_Bypassed;
|
||||
|
|
Loading…
Reference in a new issue