diff --git a/src/sound/music_midistream.cpp b/src/sound/music_midistream.cpp index f9c2d4f280..c8c8ab08ed 100644 --- a/src/sound/music_midistream.cpp +++ b/src/sound/music_midistream.cpp @@ -339,6 +339,10 @@ void MIDIStreamer::Play(bool looping, int subsong) if (MIDI->Preprocess(this, looping)) { StartPlayback(); + if (MIDI == NULL) + { // The MIDI file had no content and has been automatically closed. + return; + } } if (0 != MIDI->Resume())