[Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.14,1.15

James Brown ender at users.sourceforge.net
Tue Oct 15 07:19:01 CEST 2002


Update of /cvsroot/scummvm/scummvm/sound
In directory usw-pr-cvs1:/tmp/cvs-serv21940/sound

Modified Files:
	mixer.cpp 
Log Message:
Sanity checking to fix crash caused by latest sound commits


Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- mixer.cpp	15 Oct 2002 07:01:33 -0000	1.14
+++ mixer.cpp	15 Oct 2002 14:17:59 -0000	1.15
@@ -112,6 +112,11 @@
 }
 
 void SoundMixer::stopChannel(int index) {
+	if (index < 0) {
+		warning("soundMixer::stopChannel has invalid index %d", index);
+		return;
+	}
+
 	if (_channels[index] == NULL) {
 		_channels[index]->_toBeDestroyed = true;
 	}





More information about the Scummvm-git-logs mailing list