summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-11-26 13:26:30 +0000
committerCarl Hetherington <carl@carlh.net>2009-11-26 13:26:30 +0000
commitb3d86acf38e3a433e601c19ca6dd68555182da83 (patch)
tree91944d8e6fc92d8f1dd58742e9ec01d9ea55127b /libs/ardour/route.cc
parent966e09677d74be7d54ac253a6c244882d6efaffd (diff)
Fix various crashes on session close.
git-svn-id: svn://localhost/ardour2/branches/3.0@6186 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 8d7c170759..912e80c0ea 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -163,8 +163,14 @@ Route::~Route ()
{
Metering::disconnect (_meter_connection);
- clear_processors (PreFader);
- clear_processors (PostFader);
+ /* don't use clear_processors here, as it depends on the session which may
+ be half-destroyed by now */
+
+ Glib::RWLock::WriterLock lm (_processor_lock);
+ for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
+ (*i)->drop_references ();
+ }
+ _processors.clear ();
}
void