AGI: Add WINNIE error checking when playing sound

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

Bug #14454
This commit is contained in:
sluicebox 2024-03-06 14:23:45 -07:00
parent bd31446dd2
commit 198e28bdd9

View File

@ -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);