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:
parent
b90a9e5838
commit
f88cbbaa4a
1 changed files with 4 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue