From 9a704e51c1b777bd5c4cc07c49248010036b309b Mon Sep 17 00:00:00 2001 From: Sylvain Dupont Date: Thu, 4 Nov 2010 22:06:22 +0000 Subject: TOON: Fix ambient audio destroy in chapter 2 (Thanks to Thomas) svn-id: r54075 --- engines/toon/audio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/toon') diff --git a/engines/toon/audio.cpp b/engines/toon/audio.cpp index 90f2e3ae34..2a078b8a23 100644 --- a/engines/toon/audio.cpp +++ b/engines/toon/audio.cpp @@ -595,10 +595,10 @@ void AudioManager::killAllAmbientSFX() 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; } } } -- cgit v1.2.3