13
0

Fix crash on Session Export when master-bus has too many channels

This commit is contained in:
Robin Gareus 2020-05-31 18:31:14 +02:00
parent 54c1c0cc2c
commit 3318758855
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -165,9 +165,7 @@ PortExportChannelSelector::RouteCols::add_channels (uint32_t chans)
PortExportChannelSelector::RouteCols::Channel &
PortExportChannelSelector::RouteCols::get_channel (uint32_t channel)
{
if (channel > n_channels) {
std::cout << "Invalid channel count for get_channel!" << std::endl;
}
assert (channel > 0 && channel <= channels.size ());
std::list<Channel>::iterator it = channels.begin();
@ -274,7 +272,9 @@ PortExportChannelSelector::ChannelTreeView::set_config (ChannelConfigPtr c)
r_it->set_value (route_cols.get_channel (i).label, label);
}
++i;
if (++i > n_channels) {
break;
}
}
}