mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-12-04 01:41:42 +00:00
- Fixed crash when trying to play a MIDI file with no notes.
SVN r3294 (trunk)
This commit is contained in:
parent
de8bf651f2
commit
c12538c346
1 changed files with 4 additions and 0 deletions
|
@ -339,6 +339,10 @@ void MIDIStreamer::Play(bool looping, int subsong)
|
||||||
if (MIDI->Preprocess(this, looping))
|
if (MIDI->Preprocess(this, looping))
|
||||||
{
|
{
|
||||||
StartPlayback();
|
StartPlayback();
|
||||||
|
if (MIDI == NULL)
|
||||||
|
{ // The MIDI file had no content and has been automatically closed.
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 != MIDI->Resume())
|
if (0 != MIDI->Resume())
|
||||||
|
|
Loading…
Reference in a new issue