13
0

ensure that Editor::entered_track is reset during session deletion to avoid a crash when we explicitly unset it elsewhere

This commit is contained in:
Paul Davis 2014-06-30 12:31:01 -04:00
parent 156f01cda6
commit 416abf7f1c

View File

@ -4874,6 +4874,10 @@ Editor::add_routes (RouteList& routes)
void
Editor::timeaxisview_deleted (TimeAxisView *tv)
{
if (tv == entered_track) {
entered_track = 0;
}
if (_session && _session->deletion_in_progress()) {
/* the situation is under control */
return;
@ -4885,10 +4889,6 @@ Editor::timeaxisview_deleted (TimeAxisView *tv)
_routes->route_removed (tv);
if (tv == entered_track) {
entered_track = 0;
}
TimeAxisView::Children c = tv->get_child_list ();
for (TimeAxisView::Children::const_iterator i = c.begin(); i != c.end(); ++i) {
if (entered_track == i->get()) {