fix possible crash when closing Furnace

This commit is contained in:
tildearrow 2022-08-07 17:37:07 -05:00
parent f80488d9b0
commit b8012344e7

View file

@ -3339,6 +3339,7 @@ bool DivEngine::initAudioBackend() {
bool DivEngine::deinitAudioBackend() { bool DivEngine::deinitAudioBackend() {
if (output!=NULL) { if (output!=NULL) {
output->quit();
if (output->midiIn) { if (output->midiIn) {
if (output->midiIn->isDeviceOpen()) { if (output->midiIn->isDeviceOpen()) {
logI("closing MIDI input."); logI("closing MIDI input.");
@ -3352,7 +3353,6 @@ bool DivEngine::deinitAudioBackend() {
} }
} }
output->quitMidi(); output->quitMidi();
output->quit();
delete output; delete output;
output=NULL; output=NULL;
//audioEngine=DIV_AUDIO_NULL; //audioEngine=DIV_AUDIO_NULL;