fix crash when copy'ing latent plugins
[ardour.git] / libs / ardour / plugin_insert.cc
index bfa86fbc80769006f6c2b36db9faa10f991c56dc..9a0e6c55c40574e32cd001bf5e3df688593e625c 100644 (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 ();