From 5ac826d0e0ee93f12a5053ae97e684aec47402df Mon Sep 17 00:00:00 2001 From: Tom M Date: Wed, 4 Oct 2017 19:54:57 +0200 Subject: [PATCH] fail if LADSPA alloc fails but was requested by user --- src/synth/fluid_synth.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c index f724046a..16466edc 100644 --- a/src/synth/fluid_synth.c +++ b/src/synth/fluid_synth.c @@ -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