aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorTravis Howell2010-10-18 04:25:53 +0000
committerTravis Howell2010-10-18 04:25:53 +0000
commitada933c2ad25bce6200d0edfb0df73ecca17b764 (patch)
tree001bc491a71e54a7e341efe6d804f8d3caf6eb23 /engines/scumm
parent34ff8269185dded206173796383eb3bd4732c769 (diff)
downloadscummvm-rg350-ada933c2ad25bce6200d0edfb0df73ecca17b764.tar.gz
scummvm-rg350-ada933c2ad25bce6200d0edfb0df73ecca17b764.tar.bz2
scummvm-rg350-ada933c2ad25bce6200d0edfb0df73ecca17b764.zip
SCUMM: Check the sound channel is valid, before checking the sound channel.
svn-id: r53562
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/he/sound_he.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index f059ee7d5e..318cb818b6 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -276,7 +276,7 @@ int SoundHE::getSoundVar(int sound, int var) {
chan = i;
}
- if (_mixer->isSoundHandleActive(_heSoundChannels[chan]) && chan != -1) {
+ if (chan != -1 && _mixer->isSoundHandleActive(_heSoundChannels[chan])) {
debug(5, "getSoundVar: sound %d var %d result %d", sound, var, _heChannel[chan].soundVars[var]);
return _heChannel[chan].soundVars[var];
} else {