diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index ea586405d8..042d03fa57 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -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()) {