Browse Source

Do not assert/crash when bad clients send unordered events

tags/v1.9.13
falkTX 6 years ago
parent
commit
fb87a14b3e
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      common/JackMidiPort.cpp

+ 5
- 1
common/JackMidiPort.cpp View File

@@ -1,5 +1,6 @@
/*
Copyright (C) 2007 Dmitry Baikov
Copyright (C) 2018 Filipe Coelho
Original JACK MIDI implementation Copyright (C) 2004 Ian Esten

This program is free software; you can redistribute it and/or modify
@@ -130,7 +131,10 @@ static void MidiBufferMixdown(void* mixbuffer, void** src_buffers, int src_count
next_buf_index = i;
}
}
assert(next_event != 0);
if (next_event == 0) {
jack_error("Jack::MidiBufferMixdown - got invalid next event");
break;
}

// write the event
jack_midi_data_t* dest = mix->ReserveEvent(next_event->time, next_event->size);


Loading…
Cancel
Save