From 159d23be9f1aa9e389b2bca8aec1bb673e2e2549 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 15 Oct 2015 13:49:35 +0200 Subject: [PATCH] fix deadlock when removing subgroup bus w/sends. ...and potentially other route removals that involve processor changes. --- libs/ardour/session.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 479b433f29..1231212d2e 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2064,6 +2064,10 @@ Session::resort_routes () return; } + if (_route_deletion_in_progress) { + return; + } + { RCUWriter writer (routes); boost::shared_ptr r = writer.get_copy (); @@ -3363,9 +3367,8 @@ Session::add_internal_send (boost::shared_ptr dest, boost::shared_ptr routes_to_remove) { - PBD::Unwinder uw_flag (_route_deletion_in_progress, true); - { // RCU Writer scope + PBD::Unwinder uw_flag (_route_deletion_in_progress, true); RCUWriter writer (routes); boost::shared_ptr rs = writer.get_copy ();