From d5c3b119d1321d932e483ae338a7cf63496728a6 Mon Sep 17 00:00:00 2001 From: avolkov Date: Fri, 7 Feb 2003 00:36:25 +0000 Subject: [PATCH] Fixes potential crash git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@705 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.c b/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.c index 13cfb34c3..c2ef40a02 100644 --- a/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.c +++ b/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.c @@ -153,7 +153,11 @@ TFB_mixSDL_UninitSound (void) { int i; - ConcludeTask (StreamDecoderTask); + if (StreamDecoderTask) + { + ConcludeTask (StreamDecoderTask); + StreamDecoderTask = NULL; + } for (i = 0; i < NUM_SOUNDSOURCES; ++i) {