(svn r2001) Resolve a race condition which could lead to dropped a sound and a memory leak
authortron
Sat, 12 Mar 2005 09:40:29 +0000
changeset 1497 4fc9f620d3e0
parent 1496 15d859a626e8
child 1498 508395d0639a
(svn r2001) Resolve a race condition which could lead to dropped a sound and a memory leak
mixer.c
--- a/mixer.c	Sat Mar 12 09:38:03 2005 +0000
+++ b/mixer.c	Sat Mar 12 09:40:29 2005 +0000
@@ -73,8 +73,8 @@
 static void MxCloseChannel(MixerChannel *mc)
 {
 	if (mc->flags & MX_AUTOFREE) free(mc->memory);
+	mc->active = false;
 	mc->memory = NULL;
-	mc->active = false;
 }
 
 void MxMixSamples(Mixer *mx, void *buffer, uint samples)