(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 698be1f59f4b
parent 1496 3d0b86f5dcb8
child 1498 cbe7edba0316
(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)