From 8f2c07eedc15de9c05fab8c704a86b2be6fa9f05 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 24 Nov 2010 13:56:22 +0000 Subject: [PATCH] Prevent crash when loading sessions with unknown plugins. git-svn-id: svn://localhost/ardour2/branches/3.0@8082 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/route.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index ed36a1a3b1..1bb9c63db5 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -2323,14 +2323,15 @@ Route::set_processor_state (const XMLNode& node) continue; } - processor->set_state (**niter, Stateful::current_state_version); - new_order.push_back (processor); - must_configure = true; + if (processor->set_state (**niter, Stateful::current_state_version) == 0) { + new_order.push_back (processor); + must_configure = true; + } } } } - { + { Glib::RWLock::WriterLock lm (_processor_lock); _processors = new_order; if (must_configure) {