summaryrefslogtreecommitdiff
path: root/gtk2_ardour/redirect_box.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-06-19 20:38:19 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-06-19 20:38:19 +0000
commit422607acfe28dc10fd8b188d12582a8a8cb916b9 (patch)
treeea704071f69a542d99a6bfc393706707d556269a /gtk2_ardour/redirect_box.cc
parent82031d05e0f2f4500535a6e35cdc5199b0b2d3a0 (diff)
fix a huge mess with sends, involving incorrect GUI cleanup, an unhandled exception and as a result, bad reference counting of sends leading to ports never going away because the send was never deleted
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3484 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/redirect_box.cc')
-rw-r--r--gtk2_ardour/redirect_box.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/gtk2_ardour/redirect_box.cc b/gtk2_ardour/redirect_box.cc
index e99d74e2f0..037123d169 100644
--- a/gtk2_ardour/redirect_box.cc
+++ b/gtk2_ardour/redirect_box.cc
@@ -496,7 +496,12 @@ RedirectBox::choose_send ()
/* XXX need redirect lock on route */
- send->ensure_io (0, _route->max_redirect_outs(), false, this);
+ try {
+ send->ensure_io (0, _route->max_redirect_outs(), false, this);
+ } catch (AudioEngine::PortRegistrationFailure& err) {
+ error << string_compose (_("Cannot set up new send: %1"), err.what()) << endmsg;
+ return;
+ }
IOSelectorWindow *ios = new IOSelectorWindow (_session, send, false, true);
@@ -854,6 +859,13 @@ RedirectBox::idle_delete_redirect (boost::weak_ptr<Redirect> weak_redirect)
/* NOT copied to _mixer.selection() */
no_redirect_redisplay = true;
+
+ void* gui = redirect->get_gui ();
+
+ if (gui) {
+ static_cast<Gtk::Widget*>(gui)->hide ();
+ }
+
_route->remove_redirect (redirect, this);
no_redirect_redisplay = false;
redisplay_redirects (this);