Skip to content

Commit

Permalink
SOUND: Fix wrong message when looping and makeAudioStream() returns NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
clone2727 authored and DrMcCoy committed Aug 18, 2018
1 parent 8ebe265 commit 9bc09de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sound/sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@ ChannelHandle SoundManager::playSoundFile(Common::SeekableReadStream *wavStream,

AudioStream *audioStream = makeAudioStream(wavStream);

if (!audioStream)
throw Common::Exception("No audio stream");

if (loop) {
RewindableAudioStream *reAudStream = dynamic_cast<RewindableAudioStream *>(audioStream);
if (!reAudStream)
Expand Down

0 comments on commit 9bc09de

Please sign in to comment.