fail if LADSPA alloc fails but was requested by user

This commit is contained in:
Tom M 2017-10-04 19:54:57 +02:00 committed by GitHub
parent eb42279d71
commit 5ac826d0e0

View file

@ -697,6 +697,10 @@ new_fluid_synth(fluid_settings_t *settings)
fluid_settings_getint(settings, "synth.ladspa.active", &with_ladspa);
if (with_ladspa) {
synth->LADSPA_FxUnit = new_fluid_LADSPA_FxUnit(synth);
if(synth->LADSPA_FxUnit == NULL) {
FLUID_LOG(FLUID_ERR, "Out of memory");
goto error_recovery;
}
fluid_rvoice_mixer_set_ladspa(synth->eventhandler->mixer, synth->LADSPA_FxUnit);
}
#endif