fix crash when copy'ing latent plugins
[ardour.git] / libs / ardour / route.cc
index 36d1791f9f22afff3787be34ff37eb1421702aa3..11db73241cbd304c629a556828f02611134678c9 100644 (file)
@@ -1014,8 +1014,12 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr<Processor>
                                }
                        }
 
                                }
                        }
 
+                       if (pi && pi->has_sidechain ()) {
+                               pi->sidechain_input ()->changed.connect_same_thread (*this, boost::bind (&Route::sidechain_change_handler, this, _1, _2));
+                       }
+
                        if ((*i)->active()) {
                        if ((*i)->active()) {
-                               // why?  emit  ActiveChanged() ??
+                               // emit ActiveChanged() and latency_changed() if needed
                                (*i)->activate ();
                        }
 
                                (*i)->activate ();
                        }