Fix crash when selected automation-lane is removed

When a plugin is deleted, automation-lanes of the given plugin
are removed, but previously a pointed to the deleted lane remained
in the selection.

This caused crashes later when the track selection is used. e.g.
during sensitize_the_right_region_actions()

Note that ~TimeAxisView() also emits CatchDeletion (this);
however "this" fails to be dynamic_cast<AutomationTimeAxisView*>
because that d'tor has already been completed.
This commit is contained in:
Robin Gareus 2019-08-24 18:21:08 +02:00
parent 9ce5184993
commit 629289dc4a
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 6 additions and 0 deletions

View File

@ -332,6 +332,7 @@ AutomationTimeAxisView::~AutomationTimeAxisView ()
cleanup_gui_properties ();
}
delete _view;
CatchDeletion (this);
}
void

View File

@ -5543,6 +5543,11 @@ Editor::timeaxisview_deleted (TimeAxisView *tv)
ENSURE_GUI_THREAD (*this, &Editor::timeaxisview_deleted, tv);
if (dynamic_cast<AutomationTimeAxisView*> (tv)) {
selection->remove (tv);
return;
}
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (tv);
_routes->route_removed (tv);