Delete CoreSelection at session close

This commit is contained in:
Robin Gareus 2017-07-28 20:11:55 +02:00
parent 7b7cc9ea6d
commit 964b88e651
3 changed files with 10 additions and 2 deletions

View File

@ -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 */
}

View File

@ -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 ();

View File

@ -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