mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-26 15:08:17 +01:00
Hopefully fix crash with empty IO matrix bundles
(#4270). git-svn-id: svn://localhost/ardour2/branches/3.0@10009 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
efc6b2869f
commit
67ae8c8eb9
2 changed files with 8 additions and 0 deletions
|
|
@ -82,6 +82,10 @@ BundleEditorMatrix::set_state (BundleChannel c[2], bool s)
|
|||
PortMatrixNode::State
|
||||
BundleEditorMatrix::get_state (BundleChannel c[2]) const
|
||||
{
|
||||
if (c[0].bundle->nchannels() == ChanCount::ZERO || c[1].bundle->nchannels() == ChanCount::ZERO) {
|
||||
return PortMatrixNode::NOT_ASSOCIATED;
|
||||
}
|
||||
|
||||
Bundle::PortList const& pl = c[OTHER].bundle->channel_ports (c[OTHER].channel);
|
||||
if (pl.empty ()) {
|
||||
return PortMatrixNode::NOT_ASSOCIATED;
|
||||
|
|
|
|||
|
|
@ -156,6 +156,10 @@ IOSelector::set_state (ARDOUR::BundleChannel c[2], bool s)
|
|||
PortMatrixNode::State
|
||||
IOSelector::get_state (ARDOUR::BundleChannel c[2]) const
|
||||
{
|
||||
if (c[0].bundle->nchannels() == ChanCount::ZERO || c[1].bundle->nchannels() == ChanCount::ZERO) {
|
||||
return PortMatrixNode::NOT_ASSOCIATED;
|
||||
}
|
||||
|
||||
ARDOUR::Bundle::PortList const & our_ports = c[_ours].bundle->channel_ports (c[_ours].channel);
|
||||
ARDOUR::Bundle::PortList const & other_ports = c[_other].bundle->channel_ports (c[_other].channel);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue