Fix thread exit problem.

This commit is contained in:
Johns 2013-01-06 14:47:00 +01:00
parent 7cd025a023
commit 534b4094b5

View File

@ -2851,13 +2851,16 @@ void AudioInit(void)
*/ */
void AudioExit(void) void AudioExit(void)
{ {
const AudioModule * module;
#ifdef USE_AUDIO_THREAD #ifdef USE_AUDIO_THREAD
if (AudioUsedModule->Thread) { // supports threads if (AudioUsedModule->Thread) { // supports threads
AudioExitThread(); AudioExitThread();
} }
#endif #endif
AudioUsedModule->Exit(); module = AudioUsedModule;
AudioUsedModule = &NoopModule; AudioUsedModule = &NoopModule;
module->Exit();
AudioRingExit(); AudioRingExit();
AudioRunning = 0; AudioRunning = 0;
AudioPaused = 0; AudioPaused = 0;