summaryrefslogtreecommitdiff
path: root/audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio.c')
-rw-r--r--audio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/audio.c b/audio.c
index 6948785..84b9509 100644
--- a/audio.c
+++ b/audio.c
@@ -2851,13 +2851,16 @@ void AudioInit(void)
*/
void AudioExit(void)
{
+ const AudioModule * module;
+
#ifdef USE_AUDIO_THREAD
if (AudioUsedModule->Thread) { // supports threads
AudioExitThread();
}
#endif
- AudioUsedModule->Exit();
+ module = AudioUsedModule;
AudioUsedModule = &NoopModule;
+ module->Exit();
AudioRingExit();
AudioRunning = 0;
AudioPaused = 0;