Fix memory leak

This commit is contained in:
Jeffrey Pfau 2014-07-20 22:07:08 -07:00
parent a57f911ecc
commit ad5cdb97a8
1 changed files with 9 additions and 1 deletions

View File

@ -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();
}