diff options
Diffstat (limited to 'engines/xeen/sound_driver.cpp')
-rw-r--r-- | engines/xeen/sound_driver.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/xeen/sound_driver.cpp b/engines/xeen/sound_driver.cpp index e79fcdd501..6ce10d9641 100644 --- a/engines/xeen/sound_driver.cpp +++ b/engines/xeen/sound_driver.cpp @@ -126,7 +126,10 @@ bool SoundDriver::musSkipWord(const byte *&srcP, byte param) { bool SoundDriver::cmdFreezeFrequency(const byte *&srcP, byte param) { debugC(3, kDebugSound, "cmdFreezeFrequency %d", param); - _channels[param]._changeFrequency = false; + if (param >= _channels.size()) + warning("Invalid channel %d in cmdFreezeFrequency call", param); + else + _channels[param]._changeFrequency = false; return false; } |