Skip to content

Commit

Permalink
- fixed crash when FluidSynth soundfont cannot be loaded
Browse files Browse the repository at this point in the history
Since FluidSynth 2.1.6, delete_fluid_settings() must be called after delete_fluid_synth()
  • Loading branch information
alexey-lysiuk committed Nov 21, 2022
1 parent 7a7ee92 commit 1dda85b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/mididevices/music_fluidsynth_mididevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ FluidSynthMIDIDevice::FluidSynthMIDIDevice(int samplerate, std::vector<std::stri
return;
}

delete_fluid_settings(FluidSettings);
delete_fluid_synth(FluidSynth);
delete_fluid_settings(FluidSettings);
FluidSynth = nullptr;
FluidSettings = nullptr;
throw std::runtime_error("Failed to load any MIDI patches.\n");
Expand Down

0 comments on commit 1dda85b

Please sign in to comment.