diff options
author | Robin Gareus <robin@gareus.org> | 2017-07-28 20:11:55 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-07-28 20:11:55 +0200 |
commit | 964b88e651ac3324d85f735aad3faba226b582f6 (patch) | |
tree | 34dd26bf1cdde30238ed586c645db16336c86aeb /libs | |
parent | 7b7cc9ea6d9880905ab55aeb57f603e8a5024d9f (diff) |
Delete CoreSelection at session close
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/automation_control.cc | 4 | ||||
-rw-r--r-- | libs/ardour/session.cc | 4 | ||||
-rw-r--r-- | libs/ardour/stripable.cc | 4 |
3 files changed, 10 insertions, 2 deletions
diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc index 9b7628a7ad..1c4525470b 100644 --- a/libs/ardour/automation_control.cc +++ b/libs/ardour/automation_control.cc @@ -70,7 +70,9 @@ AutomationControl::AutomationControl(ARDOUR::Session& s AutomationControl::~AutomationControl () { - _session.selection().remove_control_by_id (id()); + if (!_session.deletion_in_progress ()) { + _session.selection().remove_control_by_id (id()); + } DropReferences (); /* EMIT SIGNAL */ } diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 04c8770a78..0616c364d9 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -836,6 +836,10 @@ Session::destroy () AudioEngine::instance()->clear_pending_port_deletions (); } + DEBUG_TRACE (DEBUG::Destruction, "delete selection\n"); + delete _selection; + _selection = 0; + DEBUG_TRACE (DEBUG::Destruction, "Session::destroy() done\n"); BOOST_SHOW_POINTERS (); diff --git a/libs/ardour/stripable.cc b/libs/ardour/stripable.cc index 9f5a5743e7..24167438c3 100644 --- a/libs/ardour/stripable.cc +++ b/libs/ardour/stripable.cc @@ -44,7 +44,9 @@ Stripable::Stripable (Session& s, string const & name, PresentationInfo const & Stripable::~Stripable () { - _session.selection().remove_stripable_by_id (id()); + if (!_session.deletion_in_progress ()) { + _session.selection().remove_stripable_by_id (id()); + } } void |