diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-11-04 23:41:52 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-11-04 23:41:52 +0000 |
commit | 204d840c43445745942eb834c120cbeaff77809e (patch) | |
tree | a7e3f08259a9098132b688a14c1af259799fa2aa /gtk2_ardour/global_port_matrix.cc | |
parent | 0ede2d0088d6ffdbde8a2c9ec40c457e98bdabe9 (diff) |
a variety of fixes aimed at preventing crashes caused by the (global) port matrix (window) not really noticing that the session has gone away
git-svn-id: svn://localhost/ardour2/branches/3.0@13378 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/global_port_matrix.cc')
-rw-r--r-- | gtk2_ardour/global_port_matrix.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk2_ardour/global_port_matrix.cc b/gtk2_ardour/global_port_matrix.cc index d749990463..fcd9960e43 100644 --- a/gtk2_ardour/global_port_matrix.cc +++ b/gtk2_ardour/global_port_matrix.cc @@ -42,6 +42,10 @@ GlobalPortMatrix::GlobalPortMatrix (Gtk::Window* p, Session* s, DataType t) void GlobalPortMatrix::setup_ports (int dim) { + if (!_session) { + return; + } + _ports[dim].suspend_signals (); _ports[dim].gather (_session, type(), dim == IN, false, show_only_bundles ()); _ports[dim].resume_signals (); @@ -50,6 +54,10 @@ GlobalPortMatrix::setup_ports (int dim) void GlobalPortMatrix::set_state (BundleChannel c[2], bool s) { + if (!_session) { + return; + } + Bundle::PortList const & in_ports = c[IN].bundle->channel_ports (c[IN].channel); Bundle::PortList const & out_ports = c[OUT].bundle->channel_ports (c[OUT].channel); @@ -178,6 +186,10 @@ void GlobalPortMatrixWindow::set_session (Session* s) { _port_matrix.set_session (s); + + if (!s) { + hide (); + } } string |