diff options
author | Sylvain Dupont | 2010-11-04 22:06:22 +0000 |
---|---|---|
committer | Sylvain Dupont | 2010-11-04 22:06:22 +0000 |
commit | 9a704e51c1b777bd5c4cc07c49248010036b309b (patch) | |
tree | d50abd915c45a261363cfafc3c9f8f8879d34692 /engines | |
parent | 016f24d16ca2bf8dae122a95ed39133f137da300 (diff) | |
download | scummvm-rg350-9a704e51c1b777bd5c4cc07c49248010036b309b.tar.gz scummvm-rg350-9a704e51c1b777bd5c4cc07c49248010036b309b.tar.bz2 scummvm-rg350-9a704e51c1b777bd5c4cc07c49248010036b309b.zip |
TOON: Fix ambient audio destroy in chapter 2
(Thanks to Thomas)
svn-id: r54075
Diffstat (limited to 'engines')
-rw-r--r-- | engines/toon/audio.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; } } } |