Skip to content

Commit

Permalink
AGI: Add WINNIE error checking when playing sound
Browse files Browse the repository at this point in the history
Fixes crash that occurs when attempting to play the wind (sound 10)

Bug #14454
  • Loading branch information
sluicebox committed Mar 6, 2024
1 parent bd31446 commit 198e28b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions engines/agi/preagi/winnie.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 198e28b

Please sign in to comment.