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:
parent
9ce5184993
commit
629289dc4a
|
@ -332,6 +332,7 @@ AutomationTimeAxisView::~AutomationTimeAxisView ()
|
|||
cleanup_gui_properties ();
|
||||
}
|
||||
delete _view;
|
||||
CatchDeletion (this);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue