HDB: Bail if the music stream couldn't be created.

This commit is contained in:
Henrik "Henke37" Andersson 2019-10-10 03:23:27 +02:00 committed by Eugene Sandulenko
parent 89b20bbb86
commit 5675a00d8f

View File

@ -1789,12 +1789,15 @@ void Song::stop() {
}
void Song::playSong(SoundType song, bool fadeIn, int ramp) {
this->_song = song;
this->_playing = true;
Common::String fileName = getFileName(song);
Audio::AudioStream* musicStream = createStream(fileName);
if (musicStream == nullptr) return;
this->_song = song;
this->_playing = true;
int initialVolume;
if (fadeIn) {