My application is receiving a continuous stream of MIDI message. When I’m deleting a MidiInput (when exiting the application for example), I’m sometimes getting calls to
void handleIncomingMidiMessage (snd_seq_event* event, const MidiMessage& message)
while ~MidiInput is running. More precisely, handleIncomingMidiMessage crashes because ports[event->dest.port] is nullptr ( it is set to nullptr by ports.set (port->portId, nullptr); in deletePort .
the ~MidiInput is executed in the message thread, while the handleIncomingMidiMessage runs in the MidiInputThread.
