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.
This commit is contained in:
parent
96b3f8ec92
commit
ac9bc19762
@ -907,6 +907,12 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr<Processor>
|
|||||||
ProcessorList::iterator loc;
|
ProcessorList::iterator loc;
|
||||||
boost::shared_ptr <PluginInsert> fanout;
|
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) {
|
if (before) {
|
||||||
loc = find(_processors.begin(), _processors.end(), before);
|
loc = find(_processors.begin(), _processors.end(), before);
|
||||||
if (loc == _processors.end ()) {
|
if (loc == _processors.end ()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user