diff options
author | Robin Gareus <robin@gareus.org> | 2017-03-01 18:52:40 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-03-01 18:52:40 +0100 |
commit | ac9bc1976234f6cf8b732e237192834ad43c8e81 (patch) | |
tree | 97e65d8b943f66e73ac0be68bceefbe3b62f4fc6 /libs | |
parent | 96b3f8ec928960fdaca9d1e868942e2595f0331f (diff) |
Fix crash when adding a plugin immediately after re-order (via script)
The re-order is queued to be performed click-free in realtime-context.
Meanwhile adding plugins will result in a race-condition.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/route.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index b6f4f5fad7..44d7958740 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -907,6 +907,12 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr<Processor> ProcessorList::iterator loc; boost::shared_ptr <PluginInsert> fanout; + if (g_atomic_int_get (&_pending_process_reorder)) { + /* we need to flush any pending re-order changes */ + Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ()); + apply_processor_changes_rt (); + } + if (before) { loc = find(_processors.begin(), _processors.end(), before); if (loc == _processors.end ()) { |