diff options
Diffstat (limited to 'src/frontend/qt_sdl/AudioInOut.cpp')
-rw-r--r-- | src/frontend/qt_sdl/AudioInOut.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/frontend/qt_sdl/AudioInOut.cpp b/src/frontend/qt_sdl/AudioInOut.cpp index d44e92d..48e8a86 100644 --- a/src/frontend/qt_sdl/AudioInOut.cpp +++ b/src/frontend/qt_sdl/AudioInOut.cpp @@ -334,12 +334,17 @@ void Init() void DeInit() { if (audioDevice) SDL_CloseAudioDevice(audioDevice); + audioDevice = 0; MicClose(); - SDL_DestroyCond(audioSync); - SDL_DestroyMutex(audioSyncLock); + if (audioSync) SDL_DestroyCond(audioSync); + audioSync = nullptr; + + if (audioSyncLock) SDL_DestroyMutex(audioSyncLock); + audioSyncLock = nullptr; if (micWavBuffer) delete[] micWavBuffer; + micWavBuffer = nullptr; } void AudioSync() |