From e60147d22dc4e12936df14cff59a4fb37711bf6d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 22 Feb 2017 09:35:49 +0100 Subject: if a slave's masters are at zero, lock slave to zero and not NaN --- libs/ardour/slavable_automation_control.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libs/ardour/slavable_automation_control.cc') diff --git a/libs/ardour/slavable_automation_control.cc b/libs/ardour/slavable_automation_control.cc index c67cb64188..cd46194316 100644 --- a/libs/ardour/slavable_automation_control.cc +++ b/libs/ardour/slavable_automation_control.cc @@ -103,7 +103,12 @@ SlavableAutomationControl::actually_set_value (double value, PBD::Controllable:: if (!_masters.empty()) { /* need to scale given value by current master's scaling */ - value /= get_masters_value_locked(); + const double masters_value = get_masters_value_locked(); + if (masters_value == 0.0) { + value = 0.0; + } else { + value /= masters_value; + } } } -- cgit v1.2.3