[Scummvm-cvs-logs] SF.net SVN: scummvm:[41501] scummvm/trunk/engines/agi/sound.cpp

sev at users.sourceforge.net sev at users.sourceforge.net
Sun Jun 14 00:48:16 CEST 2009


Revision: 41501
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41501&view=rev
Author:   sev
Date:     2009-06-13 22:48:16 +0000 (Sat, 13 Jun 2009)

Log Message:
-----------
Added sanity checking to stopSound() and a bit more debug output

Modified Paths:
--------------
    scummvm/trunk/engines/agi/sound.cpp

Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp	2009-06-13 22:40:30 UTC (rev 41500)
+++ scummvm/trunk/engines/agi/sound.cpp	2009-06-13 22:48:16 UTC (rev 41501)
@@ -411,6 +411,8 @@
 void SoundMgr::stopSound() {
 	int i;
 
+	debugC(3, kDebugLevelSound, "stopSound() --> %d", _playingSound);
+
 	_endflag = -1;
 	if (_vm->_soundemu != SOUND_EMU_APPLE2GS) {
 		for (i = 0; i < NUM_CHANNELS; i++)
@@ -418,7 +420,8 @@
 	}
 
 	if (_playingSound != -1) {
-		_vm->_game.sounds[_playingSound]->stop();
+		if (_vm->_game.sounds[_playingSound]) // sanity checking
+			_vm->_game.sounds[_playingSound]->stop();
 
 		if (_vm->_soundemu == SOUND_EMU_APPLE2GS) {
 			_gsSound.stopSounds();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list