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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -597,13 +597,13 @@ ARDOUR::cleanup ()
|
||||
return;
|
||||
}
|
||||
|
||||
delete &ControlProtocolManager::instance();
|
||||
ARDOUR::AudioEngine::destroy ();
|
||||
|
||||
delete Library;
|
||||
#ifdef HAVE_LRDF
|
||||
lrdf_cleanup ();
|
||||
#endif
|
||||
delete &ControlProtocolManager::instance();
|
||||
#ifdef WINDOWS_VST_SUPPORT
|
||||
fst_exit ();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user