From 590cf42521a92429443e44e9c9a64a29b248aada Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Tue, 29 Nov 2016 16:00:18 -0800 Subject: [PATCH] Fix crash on startup when MIDI files are resumed. --- Plugins/MIDI/MIDI/MIDIDecoder.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Plugins/MIDI/MIDI/MIDIDecoder.mm b/Plugins/MIDI/MIDI/MIDIDecoder.mm index 9135f9e4e..34207f815 100755 --- a/Plugins/MIDI/MIDI/MIDIDecoder.mm +++ b/Plugins/MIDI/MIDI/MIDIDecoder.mm @@ -324,6 +324,12 @@ static OSType getOSType(const char * in_) - (long)seek:(long)frame { + if (!player) { + float temp[2]; + if ([self readAudio:temp frames:1] < 1) + return -1; + } + player->Seek( frame ); framesRead = frame;