From: Paul Davis Date: Wed, 1 Jun 2016 19:15:03 +0000 (-0400) Subject: fix crash during session deletion while removing VCA masters X-Git-Tag: 5.0-pre1~739 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=85a9ff800735a32d415ef9d6d28fac9dc64498d8;p=ardour.git fix crash during session deletion while removing VCA masters --- diff --git a/libs/ardour/slavable_automation_control.cc b/libs/ardour/slavable_automation_control.cc index 4da324515a..d4002343e8 100644 --- a/libs/ardour/slavable_automation_control.cc +++ b/libs/ardour/slavable_automation_control.cc @@ -250,18 +250,22 @@ SlavableAutomationControl::remove_master (boost::shared_ptr m pre_remove_master (m); - { Glib::Threads::RWLock::WriterLock lm (master_lock); current_value = get_value_locked (); erased = _masters.erase (m->id()); - if (erased) { + if (erased && !_session.deletion_in_progress()) { recompute_masters_ratios (current_value); } masters_left = _masters.size (); new_value = get_value_locked (); } + if (_session.deletion_in_progress()) { + /* no reason to care about new values or sending signals */ + return; + } + if (erased) { MasterStatusChange (); /* EMIT SIGNAL */ }