mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
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:
parent
81f12f602b
commit
d0c934a9de
2 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue