properly handle port removal in route.

bug:
 - add midi track
 - add additional midi port
 - remove additional midi port
 - press play
 -> crash

because..

ARDOUR::MidiTrack::roll's route_buffer still has 2 midi-channels. This is
because processor_max_streams was not updated (no plugins added/removed)
fill_buffers_with_input() eventually asserts when trying to get the 2nd
(nonexistant) midi port via ARDOUR::PortSet::nth_midi_port() in
 ARDOUR::PortSet::port().
This commit is contained in:
Robin Gareus 2013-08-03 03:44:51 +02:00
parent 9d63cfcab5
commit b14d9a6451

View File

@ -1708,6 +1708,7 @@ Route::configure_processors_unlocked (ProcessorStreams* err)
ChanCount out;
bool seen_mains_out = false;
processor_out_streams = _input->n_ports();
processor_max_streams.reset();
list< pair<ChanCount,ChanCount> >::iterator c = configuration.begin();
for (ProcessorList::iterator p = _processors.begin(); p != _processors.end(); ++p, ++c) {