diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp index f511386a3df..4371aea495e 100644 --- a/audio/softsynth/fluidsynth.cpp +++ b/audio/softsynth/fluidsynth.cpp @@ -517,6 +517,15 @@ void MidiDriver_FluidSynth::close() { _mixer->stopHandle(_mixerSoundHandle); + /* + * Don't delete the soundfont before cleaning up + * Some parts of it are still in use and cause a timer thread to be + * created to postpone the cleanup. + * The "embedded" OS abstraction layer introduced in Fluidsynth 2.5 does + * not supported threads and this causes a segfault when the final cleanup happens + * just below. + */ + delete_fluid_synth(_synth); delete_fluid_settings(_settings); }