summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/surfaces/websockets/feedback.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/surfaces/websockets/feedback.cc b/libs/surfaces/websockets/feedback.cc
index f7591fb33d..6e956f8f61 100644
--- a/libs/surfaces/websockets/feedback.cc
+++ b/libs/surfaces/websockets/feedback.cc
@@ -68,8 +68,12 @@ struct PluginBypassObserver {
struct PluginParamValueObserver {
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,
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,
boost::bind<void> (PluginParamValueObserver (), this, strip_n, plugin_n, param_n,
- control),
+ boost::weak_ptr<AutomationControl>(control)),
event_loop ());
}
}