Add missing check for memory allocation error on chorus effect

This commit is contained in:
Marcus Weseloh 2017-10-24 22:50:25 +02:00
parent 7ed5d1f1d8
commit 3ec593a6aa

View file

@ -530,7 +530,7 @@ new_fluid_rvoice_mixer(int buf_count, int fx_buf_count, fluid_real_t sample_rate
/* allocate the reverb module */
mixer->fx.reverb = new_fluid_revmodel(sample_rate);
mixer->fx.chorus = new_fluid_chorus(sample_rate);
if (mixer->fx.reverb == NULL) {
if (mixer->fx.reverb == NULL || mixer->fx.chorus == NULL) {
FLUID_LOG(FLUID_ERR, "Out of memory");
delete_fluid_rvoice_mixer(mixer);
return NULL;