Allow sparse CC lists.
authorRobin Gareus <robin@gareus.org>
Tue, 6 Dec 2016 21:51:55 +0000 (22:51 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 6 Dec 2016 21:56:04 +0000 (22:56 +0100)
libs/ardour/instrument_info.cc

index 2f77d980ba3a369489a5c1957eccc776091047e7..09fef4f482546391b185562de180feb7facb5a1f 100644 (file)
@@ -150,8 +150,13 @@ InstrumentInfo::get_controller_name (Evoral::Parameter param) const
        if (!control_names) {
                return "";
        }
+       boost::shared_ptr<const Control> c = control_names->control(param.id());
 
-       return control_names->control(param.id())->name();
+       if (c) {
+               return c->name();
+       }
+
+       return "";
 }
 
 boost::shared_ptr<MIDI::Name::ChannelNameSet>