Tweak deletion, emit CatchDeletion() only once
Parent class d'tor runs after derived class d'tor. By the time ~TimeAxisView() is called, the actual object has already been deleted and dyanamic_cast<RouteTimeAxisView*> or dynamic_cast<AutomationTimeAxisView*> will fail. CatchDeletion() needs to be emitted from the actual d'tor of the object. There are currently three non-virtual TAVs: * RouteTimeAxisView * AutomationTimeAxisView * VCATimeAxisView The first two already directly emit CatchDeletion(), there's no need to call it again from ~TimeAxisView().
This commit is contained in:
parent
7859340191
commit
1f05baa881
|
@ -234,8 +234,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
|
|||
|
||||
TimeAxisView::~TimeAxisView()
|
||||
{
|
||||
CatchDeletion (this);
|
||||
|
||||
in_destructor = true;
|
||||
|
||||
for (list<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
|
||||
|
|
|
@ -123,6 +123,7 @@ VCATimeAxisView::VCATimeAxisView (PublicEditor& ed, Session* s, ArdourCanvas::Ca
|
|||
VCATimeAxisView::~VCATimeAxisView ()
|
||||
{
|
||||
delete automation_action_menu;
|
||||
CatchDeletion (this);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue
Block a user