Add method to find subgroup_bus
[ardour.git] / libs / ardour / control_protocol_manager.cc
index 861684846754db21c62bf9e8bc83ae8f8d840fc8..c2929a396870a5dc1ba660812f70f97f51570832 100644 (file)
@@ -76,6 +76,7 @@ ControlProtocolManager::~ControlProtocolManager()
 
 
        for (list<ControlProtocolInfo*>::iterator p = control_protocol_info.begin(); p != control_protocol_info.end(); ++p) {
+               (*p)->protocol = 0; // protocol was already destroyed above.
                delete (*p);
        }
 
@@ -482,7 +483,9 @@ ControlProtocolManager::set_state (const XMLNode& node, int /*version*/)
                        ControlProtocolInfo* cpi = cpi_by_name (name);
 
                        if (cpi) {
+#ifndef NDEBUG
                                std::cerr << "protocol " << name << " active ? " << active << std::endl;
+#endif
 
                                if (active) {
                                        delete cpi->state;