FP8: Clear input port on close. Fixes crash when switching snapshots
authorRobin Gareus <robin@gareus.org>
Sat, 1 Jul 2017 00:22:44 +0000 (02:22 +0200)
committerRobin Gareus <robin@gareus.org>
Sat, 1 Jul 2017 00:55:47 +0000 (02:55 +0200)
commitd421e56fc0d8fafbaa5a11690c6f7c0d728ed4c4
tree552a65893ca397f218416376036a546f9d8ce96d
parentf7452c2a3a275356de32b4019a57034c7b8afe2f
FP8: Clear input port on close. Fixes crash when switching snapshots

The midi_input_handler for the AsyncMIDIPort is connected to the
main event-loop. Events may still be delivered after the surface was
destroyed.

That by itself is not harmful, unless a given message produces a reply:
The _output_port is already gone, FaderPort8::tx_midi crashes.
libs/surfaces/faderport8/faderport8.cc