mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Properly solve d'tor order (controllable first) #8756
This commit is contained in:
parent
43da7c6e6f
commit
96febb8f26
1 changed files with 15 additions and 0 deletions
|
|
@ -121,6 +121,21 @@ PluginInsert::drop_references ()
|
|||
for (Plugins::iterator i = _plugins.begin(); i != _plugins.end(); ++i) {
|
||||
(*i)->drop_references ();
|
||||
}
|
||||
|
||||
/* PluginInsert::_plugins must exist until PBD::Controllable
|
||||
* has emitted drop_references. This is because
|
||||
* AC::get_value() calls _plugin[0]->get_parameter(..)
|
||||
*
|
||||
* Usually ~Automatable, calls drop_references for each
|
||||
* controllable, but that runs after ~PluginInsert.
|
||||
*/
|
||||
{
|
||||
Glib::Threads::Mutex::Lock lm (_control_lock);
|
||||
for (Controls::const_iterator li = _controls.begin(); li != _controls.end(); ++li) {
|
||||
boost::dynamic_pointer_cast<AutomationControl>(li->second)->drop_references ();
|
||||
}
|
||||
_controls.clear ();
|
||||
}
|
||||
Processor::drop_references ();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue