diff options
author | Carl Hetherington <carl@carlh.net> | 2011-08-19 14:45:08 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-08-19 14:45:08 +0000 |
commit | 67ae8c8eb921d0e7176e809cdbd23a5d1867ade2 (patch) | |
tree | f64dfb5207d6a00f14d3b0874ebe5bd12bd3d17e /gtk2_ardour/io_selector.cc | |
parent | efc6b2869fc5840cd1ffd85eb51b1ffbf737c897 (diff) |
Hopefully fix crash with empty IO matrix bundles
(#4270).
git-svn-id: svn://localhost/ardour2/branches/3.0@10009 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/io_selector.cc')
-rw-r--r-- | gtk2_ardour/io_selector.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc index 8b47c46f39..b9e19de7ad 100644 --- a/gtk2_ardour/io_selector.cc +++ b/gtk2_ardour/io_selector.cc @@ -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); |