diff options
author | Robin Gareus <robin@gareus.org> | 2019-08-24 18:42:51 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-08-24 18:42:51 +0200 |
commit | 1f05baa88163696052359552469a4a88be361912 (patch) | |
tree | 49a57eea03d03f20d8da0a7a5d06a6649d12797c /gtk2_ardour/vca_time_axis.cc | |
parent | 7859340191a93c1f36b6dc9b513fa7c70a94cc1b (diff) |
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().
Diffstat (limited to 'gtk2_ardour/vca_time_axis.cc')
-rw-r--r-- | gtk2_ardour/vca_time_axis.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gtk2_ardour/vca_time_axis.cc b/gtk2_ardour/vca_time_axis.cc index af44802d01..5ff9513894 100644 --- a/gtk2_ardour/vca_time_axis.cc +++ b/gtk2_ardour/vca_time_axis.cc @@ -123,6 +123,7 @@ VCATimeAxisView::VCATimeAxisView (PublicEditor& ed, Session* s, ArdourCanvas::Ca VCATimeAxisView::~VCATimeAxisView () { delete automation_action_menu; + CatchDeletion (this); } void |