aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorTravis Howell2010-10-18 04:23:30 +0000
committerTravis Howell2010-10-18 04:23:30 +0000
commit34ff8269185dded206173796383eb3bd4732c769 (patch)
tree5726249680f3c19d7d77b7e77493d22a43161ebc /engines/scumm
parentf40e427ab08aaaf83efbb220d6be082fd0a362a1 (diff)
downloadscummvm-rg350-34ff8269185dded206173796383eb3bd4732c769.tar.gz
scummvm-rg350-34ff8269185dded206173796383eb3bd4732c769.tar.bz2
scummvm-rg350-34ff8269185dded206173796383eb3bd4732c769.zip
SCUMM: Check the sound channel is valid, before checking the sound channel.
svn-id: r53561
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/he/sound_he.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index 7bfd1de4cf..f059ee7d5e 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -241,7 +241,7 @@ int SoundHE::isSoundCodeUsed(int sound) {
chan = i;
}
- if (_mixer->isSoundHandleActive(_heSoundChannels[chan]) && chan != -1) {
+ if (chan != -1 && _mixer->isSoundHandleActive(_heSoundChannels[chan])) {
return _heChannel[chan].sbngBlock;
} else {
return 0;
@@ -255,7 +255,7 @@ int SoundHE::getSoundPos(int sound) {
chan = i;
}
- if (_mixer->isSoundHandleActive(_heSoundChannels[chan]) && chan != -1) {
+ if (chan != -1 && _mixer->isSoundHandleActive(_heSoundChannels[chan])) {
int time = _vm->getHETimer(chan + 4) * _heChannel[chan].rate / 1000;
return time;
} else {