Fix crash when cleaning up w/o destroying session

- Control-protocols may transmit data during cleanup
 (e.g. reset surface), and need the Audio-engine to do so.
- destroying the ControlProtocolManager w/o the Session calling
 ::drop_protocols(), lead to a double free.
This commit is contained in:
Robin Gareus 2017-08-03 18:43:12 +02:00
parent 81f12f602b
commit d0c934a9de
2 changed files with 2 additions and 1 deletions

View file

@ -76,6 +76,7 @@ ControlProtocolManager::~ControlProtocolManager()
for (list<ControlProtocolInfo*>::iterator p = control_protocol_info.begin(); p != control_protocol_info.end(); ++p) { 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); delete (*p);
} }

View file

@ -597,13 +597,13 @@ ARDOUR::cleanup ()
return; return;
} }
delete &ControlProtocolManager::instance();
ARDOUR::AudioEngine::destroy (); ARDOUR::AudioEngine::destroy ();
delete Library; delete Library;
#ifdef HAVE_LRDF #ifdef HAVE_LRDF
lrdf_cleanup (); lrdf_cleanup ();
#endif #endif
delete &ControlProtocolManager::instance();
#ifdef WINDOWS_VST_SUPPORT #ifdef WINDOWS_VST_SUPPORT
fst_exit (); fst_exit ();
#endif #endif