13
0

fix crash during session deletion while removing VCA masters

This commit is contained in:
Paul Davis 2016-06-01 15:15:03 -04:00
parent eeed8edf82
commit 85a9ff8007

View File

@ -250,18 +250,22 @@ SlavableAutomationControl::remove_master (boost::shared_ptr<AutomationControl> 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 */
}