aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Kołodziejski2002-10-15 18:08:20 +0000
committerPaweł Kołodziejski2002-10-15 18:08:20 +0000
commit15ac1c1ee9292073fb8dead67111e31c8f328690 (patch)
treeee37dac21f50a5bad2f308ec0607472f24edecf9
parent53c60b20d895f9a35de742334317cd4ff1ed4133 (diff)
downloadscummvm-rg350-15ac1c1ee9292073fb8dead67111e31c8f328690.tar.gz
scummvm-rg350-15ac1c1ee9292073fb8dead67111e31c8f328690.tar.bz2
scummvm-rg350-15ac1c1ee9292073fb8dead67111e31c8f328690.zip
fix
svn-id: r5156
-rw-r--r--sound/mixer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp
index 931f8c05aa..e13f6c601b 100644
--- a/sound/mixer.cpp
+++ b/sound/mixer.cpp
@@ -112,12 +112,12 @@ int SoundMixer::playStream(PlayingSoundHandle * handle, int idx, void * sound, u
}
void SoundMixer::stopChannel(int index) {
- if (index < 0) {
+ if ((index < 0) || (index >= NUM_CHANNELS)) {
warning("soundMixer::stopChannel has invalid index %d", index);
return;
}
- if (_channels[index] == NULL) {
+ if (_channels[index] != NULL) {
_channels[index]->_toBeDestroyed = true;
}
}