summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix_grid.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-09-27 20:15:49 +0000
committerCarl Hetherington <carl@carlh.net>2011-09-27 20:15:49 +0000
commit89543bf4db0dfb7a28343d46ad1211393980125e (patch)
treeb61f44179a69b9a1afde6295664e576db12356f2 /gtk2_ardour/port_matrix_grid.cc
parent20dc91d0adf8bc54acb1bdb7fe6e368255d75e56 (diff)
Fix assertion failure on clicking on bundles whose channels are all of the wrong type.
git-svn-id: svn://localhost/ardour2/branches/3.0@10147 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_grid.cc')
-rw-r--r--gtk2_ardour/port_matrix_grid.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk2_ardour/port_matrix_grid.cc b/gtk2_ardour/port_matrix_grid.cc
index fa394de8ef..67fa73c097 100644
--- a/gtk2_ardour/port_matrix_grid.cc
+++ b/gtk2_ardour/port_matrix_grid.cc
@@ -328,6 +328,13 @@ PortMatrixGrid::button_press (double x, double y, int b, uint32_t t, guint)
void
PortMatrixGrid::set_association (PortMatrixNode node, bool s)
{
+ if (node.row.bundle->nchannels().n_total() == 0 || node.column.bundle->nchannels().n_total() == 0) {
+ /* One of the bundles has no channels, which means that it has none of the appropriate type,
+ and is only being displayed to look pretty. So we don't need to do anything.
+ */
+ return;
+ }
+
if (_matrix->show_only_bundles()) {
for (uint32_t i = 0; i < node.column.bundle->nchannels().n_total(); ++i) {