[Scummvm-git-logs] scummvm branch-2-8 -> 2106470cc67cd3a3a39db686cec9380e5c29a005

sluicebox noreply at scummvm.org
Wed Mar 6 21:44:10 UTC 2024


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:
2106470cc6 AGI: Add WINNIE error checking when playing sound


Commit: 2106470cc67cd3a3a39db686cec9380e5c29a005
    https://github.com/scummvm/scummvm/commit/2106470cc67cd3a3a39db686cec9380e5c29a005
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-03-06T14:44:02-07:00

Commit Message:
AGI: Add WINNIE error checking when playing sound

Fixes crash that occurs when attempting to play the wind (sound 10)

Bug #14454

Changed paths:
    engines/agi/preagi/winnie.cpp


diff --git a/engines/agi/preagi/winnie.cpp b/engines/agi/preagi/winnie.cpp
index 7ce80222cf0..2ba27156598 100644
--- a/engines/agi/preagi/winnie.cpp
+++ b/engines/agi/preagi/winnie.cpp
@@ -1148,6 +1148,9 @@ bool WinnieEngine::playSound(ENUM_WTP_SOUND iSound) {
 	file.close();
 
 	_game.sounds[0] = AgiSound::createFromRawResource(data, size, 0, _soundemu);
+	if (_game.sounds[0] == nullptr) {
+		return false;
+	}
 	_sound->startSound(0, 0);
 
 	bool cursorShowing = CursorMan.showMouse(false);




More information about the Scummvm-git-logs mailing list