midiproc: consider the case that RegisterSong() fails

More specifically, because Mix_LoadMUS() fails, e.g. because it does not
recognize the music lump's file format. Music lumps are not always in
MUS or MIDI format nowadays, so let other code handle that.
This commit is contained in:
Fabian Greffrath 2017-11-23 15:22:24 +01:00
parent b90a9e5838
commit f88cbbaa4a

View file

@ -170,7 +170,10 @@ static boolean MidiPipe_RegisterSong(buffer_reader_t *reader)
return false;
}
RegisterSong(filename);
if (!RegisterSong(filename))
{
return false;
}
if (!WriteInt16(buffer, sizeof(buffer),
MIDIPIPE_PACKET_TYPE_REGISTER_SONG_ACK))