fix crash when copy'ing latent plugins

This commit is contained in:
Robin Gareus 2016-08-10 16:31:56 +02:00
parent e9752ff93e
commit c8c6bca658
2 changed files with 8 additions and 1 deletions

View File

@ -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 ();

View File

@ -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 ();
}