[Scummvm-git-logs] scummvm master -> d241e5ba645486cab7824520bf1f65b659cee4dc
npjg
nathanael.gentrydb8 at gmail.com
Wed Jul 22 16:20:18 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d241e5ba64 DIRECTOR: Only fade valid sound channels
Commit: d241e5ba645486cab7824520bf1f65b659cee4dc
https://github.com/scummvm/scummvm/commit/d241e5ba645486cab7824520bf1f65b659cee4dc
Author: Nathanael Gentry (nathanael.gentrydb8 at gmail.com)
Date: 2020-07-22T12:19:17-04:00
Commit Message:
DIRECTOR: Only fade valid sound channels
Changed paths:
engines/director/sound.cpp
diff --git a/engines/director/sound.cpp b/engines/director/sound.cpp
index 57eb43db69..9b09c7e49f 100644
--- a/engines/director/sound.cpp
+++ b/engines/director/sound.cpp
@@ -134,6 +134,11 @@ void DirectorSound::playCastMember(int castId, uint8 soundChannel, bool allowRep
}
void DirectorSound::playFade(uint8 soundChannel, bool fadeIn, int ticks) {
+ if (soundChannel == 0 || soundChannel > _channels.size()) {
+ warning("Invalid sound channel %d", soundChannel);
+ return;
+ }
+
Audio::SoundHandle handle = _channels[soundChannel - 1].handle;
if (!isChannelActive(soundChannel))
More information about the Scummvm-git-logs
mailing list