[Scummvm-cvs-logs] SF.net SVN: scummvm:[54075] scummvm/trunk/engines/toon/audio.cpp

sylvaintv at users.sourceforge.net sylvaintv at users.sourceforge.net
Thu Nov 4 23:06:22 CET 2010


Revision: 54075
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54075&view=rev
Author:   sylvaintv
Date:     2010-11-04 22:06:22 +0000 (Thu, 04 Nov 2010)

Log Message:
-----------
TOON: Fix ambient audio destroy in chapter 2

(Thanks to Thomas)

Modified Paths:
--------------
    scummvm/trunk/engines/toon/audio.cpp

Modified: scummvm/trunk/engines/toon/audio.cpp
===================================================================
--- scummvm/trunk/engines/toon/audio.cpp	2010-11-04 20:42:19 UTC (rev 54074)
+++ scummvm/trunk/engines/toon/audio.cpp	2010-11-04 22:06:22 UTC (rev 54075)
@@ -595,10 +595,10 @@
 		if (ambient->_enabled) {
 			ambient->_enabled = false;
 			ambient->_id = -1;
-
-			if (_channels[ambient->_channel] && _channels[ambient->_channel]->isPlaying()) {
+			if (ambient->_channel >= 0 && _channels[ambient->_channel] && _channels[ambient->_channel]->isPlaying()) {
 				_channels[ambient->_channel]->stop(false);
 			}
+			ambient->_channel = -1;
 		}
 	}
 }


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