diff --git a/src/platform/qt/AudioDevice.cpp b/src/platform/qt/AudioDevice.cpp index 720356834..190157f34 100644 --- a/src/platform/qt/AudioDevice.cpp +++ b/src/platform/qt/AudioDevice.cpp @@ -49,7 +49,15 @@ void AudioThread::setInput(GBAThread* input) { void AudioThread::shutdown() { disconnect(); - m_audioOutput->stop(); + if (m_audioOutput) { + m_audioOutput->stop(); + delete m_audioOutput; + m_audioOutput = nullptr; + } + if (m_device) { + delete m_device; + m_device = nullptr; + } quit(); }