Fix deadlock, shared_ptr d'tor called from ScopedConnectionList d'tor
See https://ardour.org/styleguide.html #10 https://pastebin.com/gJfrNhL2
This commit is contained in:
parent
bcfe16610a
commit
61b6b740bc
@ -68,8 +68,12 @@ struct PluginBypassObserver {
|
|||||||
|
|
||||||
struct PluginParamValueObserver {
|
struct PluginParamValueObserver {
|
||||||
void operator() (ArdourFeedback* p, uint32_t strip_n, uint32_t plugin_n,
|
void operator() (ArdourFeedback* p, uint32_t strip_n, uint32_t plugin_n,
|
||||||
uint32_t param_n, boost::shared_ptr<AutomationControl> control)
|
uint32_t param_n, boost::weak_ptr<AutomationControl> ctrl)
|
||||||
{
|
{
|
||||||
|
boost::shared_ptr<AutomationControl> control = ctrl.lock ();
|
||||||
|
if (!control) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
p->update_all (Node::strip_plugin_param_value, strip_n, plugin_n, param_n,
|
p->update_all (Node::strip_plugin_param_value, strip_n, plugin_n, param_n,
|
||||||
ArdourStrips::plugin_param_value (control));
|
ArdourStrips::plugin_param_value (control));
|
||||||
}
|
}
|
||||||
@ -221,7 +225,7 @@ ArdourFeedback::observe_strip_plugin_param_values (uint32_t strip_n,
|
|||||||
|
|
||||||
control->Changed.connect (_signal_connections, MISSING_INVALIDATOR,
|
control->Changed.connect (_signal_connections, MISSING_INVALIDATOR,
|
||||||
boost::bind<void> (PluginParamValueObserver (), this, strip_n, plugin_n, param_n,
|
boost::bind<void> (PluginParamValueObserver (), this, strip_n, plugin_n, param_n,
|
||||||
control),
|
boost::weak_ptr<AutomationControl>(control)),
|
||||||
event_loop ());
|
event_loop ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user