[Scummvm-git-logs] scummvm master -> 097a948423f713ccde9e6a127bad1b2aede642b0
bluegr
bluegr at gmail.com
Mon Jun 14 01:12:59 UTC 2021
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:
097a948423 TRECISION: Continue if a sound can't be found - bug #12633
Commit: 097a948423f713ccde9e6a127bad1b2aede642b0
https://github.com/scummvm/scummvm/commit/097a948423f713ccde9e6a127bad1b2aede642b0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-06-14T04:12:46+03:00
Commit Message:
TRECISION: Continue if a sound can't be found - bug #12633
Fixes crash when entering code in the security panel in the terrorists'
hideout
Changed paths:
engines/trecision/sound.cpp
diff --git a/engines/trecision/sound.cpp b/engines/trecision/sound.cpp
index a038bea76f..ea6690936c 100644
--- a/engines/trecision/sound.cpp
+++ b/engines/trecision/sound.cpp
@@ -65,6 +65,9 @@ void SoundManager::play(int soundId) {
if (curRoom->_sounds[soundSlot] == soundId) {
const SoundType soundType = (_gSample[soundId]._flag & kSoundFlagBgMusic) ? kSoundTypeMusic : kSoundTypeSfx;
Common::SeekableReadStream *soundFileStream = _vm->_dataFile.createReadStreamForMember(_gSample[soundId]._name);
+ if (!soundFileStream)
+ continue;
+
// We need to copy this WAV to memory since it will be streamed
Common::SeekableReadStream *memStream = soundFileStream->readStream(soundFileStream->size());
delete soundFileStream;
More information about the Scummvm-git-logs
mailing list