diff options
author | James Brown | 2002-10-15 14:17:59 +0000 |
---|---|---|
committer | James Brown | 2002-10-15 14:17:59 +0000 |
commit | bc6d4f130b3e9496776001f6145db10ff28c46f5 (patch) | |
tree | ab427d3aa191adebfcac434eea6e738d6131244f /sound/mixer.cpp | |
parent | 0b43ca86a7aeac418606b4ce48aec8b84edb11b9 (diff) | |
download | scummvm-rg350-bc6d4f130b3e9496776001f6145db10ff28c46f5.tar.gz scummvm-rg350-bc6d4f130b3e9496776001f6145db10ff28c46f5.tar.bz2 scummvm-rg350-bc6d4f130b3e9496776001f6145db10ff28c46f5.zip |
Sanity checking to fix crash caused by latest sound commits
svn-id: r5151
Diffstat (limited to 'sound/mixer.cpp')
-rw-r--r-- | sound/mixer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp index d4433f0045..931f8c05aa 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -112,6 +112,11 @@ int SoundMixer::playStream(PlayingSoundHandle * handle, int idx, void * sound, u } void SoundMixer::stopChannel(int index) { + if (index < 0) { + warning("soundMixer::stopChannel has invalid index %d", index); + return; + } + if (_channels[index] == NULL) { _channels[index]->_toBeDestroyed = true; } |