From b042072df4fcf8fd036965d2c9f5d17c34e0d2c1 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 11 Apr 2016 09:46:45 -0400 Subject: fix logic for removing an AutomationControl from a ControlGroup --- libs/ardour/automation_control.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libs/ardour/automation_control.cc') diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc index 7efaa07f23..99e2f54165 100644 --- a/libs/ardour/automation_control.cc +++ b/libs/ardour/automation_control.cc @@ -268,9 +268,11 @@ AutomationControl::interface_to_internal (double val) const void AutomationControl::set_group (boost::shared_ptr cg) { - if (_group) { - _group->remove_control (shared_from_this()); - } + /* this method can only be called by a ControlGroup. We do not need + to ensure consistency by calling ControlGroup::remove_control(), + since we are guaranteed that the ControlGroup will take care of that + for us. + */ _group = cg; } -- cgit v1.2.3