summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-08-10 16:31:56 +0200
committerRobin Gareus <robin@gareus.org>2016-08-10 16:32:34 +0200
commitc8c6bca6587450ff64303dbc994a4cd28d6ce7aa (patch)
treec83cc36f2563a39214b85302225e2e1c729b44ef
parente9752ff93ea44098fd8c02b21a3a787ef1cbf3ab (diff)
fix crash when copy'ing latent plugins5.0
-rw-r--r--libs/ardour/plugin_insert.cc7
-rw-r--r--libs/ardour/route.cc2
2 files changed, 8 insertions, 1 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index bfa86fbc80..9a0e6c55c4 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -555,6 +555,13 @@ PluginInsert::activate ()
}
Processor::activate ();
+ /* when setting state e.g ProcessorBox::paste_processor_state ()
+ * the plugin is not yet owned by a route.
+ * but no matter. Route::add_processors() will call activate () again
+ */
+ if (!owner ()) {
+ return;
+ }
if (_plugin_signal_latency != signal_latency ()) {
_plugin_signal_latency = signal_latency ();
latency_changed ();
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 4b14d761eb..11db73241c 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -1019,7 +1019,7 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr<Processor>
}
if ((*i)->active()) {
- // why? emit ActiveChanged() ??
+ // emit ActiveChanged() and latency_changed() if needed
(*i)->activate ();
}