From 4f445eab1105b15b6641b217d5c74113a8cec5fa Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 30 Nov 2009 23:34:48 +0000 Subject: [PATCH] Remove internal sends to an aux bus when it is removed. git-svn-id: svn://localhost/ardour2/branches/3.0@6228 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 93293de2b6..2af304161d 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2382,6 +2382,18 @@ Session::remove_route (shared_ptr route) route->input()->disconnect (0); route->output()->disconnect (0); + /* if the route had internal sends sending to it, remove them */ + if (route->internal_return()) { + + boost::shared_ptr r = routes.reader (); + for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { + boost::shared_ptr s = (*i)->internal_send_for (route); + if (s) { + (*i)->remove_processor (s); + } + } + } + update_latency_compensation (false, false); set_dirty();