From b8012344e7da65b5a80e9e166d48245515f6e319 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 7 Aug 2022 17:37:07 -0500 Subject: [PATCH] fix possible crash when closing Furnace --- src/engine/engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index fd94e521a..bf55d9d6e 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -3339,6 +3339,7 @@ bool DivEngine::initAudioBackend() { bool DivEngine::deinitAudioBackend() { if (output!=NULL) { + output->quit(); if (output->midiIn) { if (output->midiIn->isDeviceOpen()) { logI("closing MIDI input."); @@ -3352,7 +3353,6 @@ bool DivEngine::deinitAudioBackend() { } } output->quitMidi(); - output->quit(); delete output; output=NULL; //audioEngine=DIV_AUDIO_NULL;