MIDI::Manager* mm = MIDI::Manager::instance();
if (mm) {
- const MIDI::Manager::PortList& ports = mm->get_midi_ports();
+ boost::shared_ptr<const MIDI::Manager::PortList> ports = mm->get_midi_ports();
- for (MIDI::Manager::PortList::const_iterator i = ports.begin(); i != ports.end(); ++i) {
+ for (MIDI::Manager::PortList::const_iterator i = ports->begin(); i != ports->end(); ++i) {
root->add_child_nocopy((*i)->get_state());
}
}