summaryrefslogtreecommitdiff
path: root/libs/surfaces
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-09-30 11:07:05 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2016-09-30 11:07:05 -0500
commit7701207123891b400c144db880b77dc698a202ea (patch)
tree5052c04f95abfda55db7f1a4fecc3f3a8f1e06e3 /libs/surfaces
parent07acc1dfa639ea05c7e521fa43c7d9915b372225 (diff)
push2:small logic fix for destructor, mostly to ensure that the track_mix layout is destroyed
Otherwise it is still connected to the ControlProtocol::StripableSelectionChanged signal, even though the event loop specified in the connection has been destroyed.
Diffstat (limited to 'libs/surfaces')
-rw-r--r--libs/surfaces/push2/push2.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/libs/surfaces/push2/push2.cc b/libs/surfaces/push2/push2.cc
index 9f1290ec09..484dbcccdb 100644
--- a/libs/surfaces/push2/push2.cc
+++ b/libs/surfaces/push2/push2.cc
@@ -133,9 +133,14 @@ Push2::Push2 (ARDOUR::Session& s)
Push2::~Push2 ()
{
+ DEBUG_TRACE (DEBUG::Push2, "push2 control surface object being destroyed\n");
+
+ /* do this before stopping the event loop, so that we don't get any notifications */
selection_connection.disconnect ();
+ port_reg_connection.disconnect ();
+ port_connection.disconnect ();
- stop_event_loop (); /* this will call stop_using_device () in Quit request handler */
+ stop_using_device ();
device_release ();
ports_release ();
@@ -150,8 +155,13 @@ Push2::~Push2 ()
scale_layout = 0;
delete splash_layout;
splash_layout = 0;
+ delete track_mix_layout;
+ track_mix_layout = 0;
+
+ stop_event_loop ();
}
+
void
Push2::run_event_loop ()
{