From 16a476ee5fd7d1002b7d798d136d636f7eb6b39d Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 4 Jan 2023 04:00:36 +0100 Subject: [PATCH] Fix foldback bus duplication signal_sources() can traverse upwards. e.g. when creating a foldback send to the master-bus, everything that feeds the master also feeds the foldback (even if there is no direct send). --- gtk2_ardour/foldback_strip.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/foldback_strip.cc b/gtk2_ardour/foldback_strip.cc index ba908c4189..7590602df2 100644 --- a/gtk2_ardour/foldback_strip.cc +++ b/gtk2_ardour/foldback_strip.cc @@ -1091,11 +1091,11 @@ FoldbackStrip::duplicate_current_fb () new_fb->gain_control ()->set_value (oldgain * 0.25, PBD::Controllable::NoGroup); for (auto const& rt : old_fb->signal_sources (true)) { - boost::shared_ptr old_snd = rt->internal_send_for (old_fb); - boost::shared_ptr old_proc = old_snd; - bool old_pre = old_proc->get_pre_fader (); - rt->add_foldback_send (new_fb, !old_pre); + boost::shared_ptr old_snd = rt->internal_send_for (old_fb); if (old_snd) { + boost::shared_ptr old_proc = old_snd; + bool old_pre = old_proc->get_pre_fader (); + rt->add_foldback_send (new_fb, !old_pre); float old_gain = old_snd->gain_control ()->get_value (); boost::shared_ptr new_snd = rt->internal_send_for (new_fb); new_snd->gain_control ()->set_value (old_gain, PBD::Controllable::NoGroup);