make sure routes instrument info initializes correctly
authorHans Baier <hansfbaier@googlemail.com>
Fri, 12 Oct 2012 09:25:20 +0000 (09:25 +0000)
committerHans Baier <hansfbaier@googlemail.com>
Fri, 12 Oct 2012 09:25:20 +0000 (09:25 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@13254 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/route.cc

index 99da5ea63a6988598190022f60b1689cdcfbea60..9c051c23695cd205a68be3116b84f128c2376da2 100644 (file)
@@ -1594,7 +1594,9 @@ void
 Route::reset_instrument_info ()
 {
        boost::shared_ptr<Processor> instr = the_instrument();
-       _instrument_info.set_internal_instrument (instr);
+       if (instr) {
+               _instrument_info.set_internal_instrument (instr);
+       }
 }
 
 /** Caller must hold process lock */
@@ -2025,7 +2027,6 @@ Route::set_state (const XMLNode& node, int version)
                        processor_state.add_child_copy (*child);
                }
 
-
                if (child->name() == X_("Pannable")) {
                        if (_pannable) {
                                _pannable->set_state (*child, version);
@@ -2045,6 +2046,9 @@ Route::set_state (const XMLNode& node, int version)
 
        set_processor_state (processor_state);
 
+       // this looks up the internal instrument in processors
+       reset_instrument_info();
+
        if ((prop = node.property ("self-solo")) != 0) {
                set_self_solo (string_is_affirmative (prop->value()));
        }