move location where port handling stops during Mackie::Surface destructor
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 9 Oct 2015 15:12:28 +0000 (11:12 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 9 Oct 2015 15:12:28 +0000 (11:12 -0400)
libs/surfaces/mackie/surface.cc

index 020b389ad4a48bec5ff58cee0324b2ed33d4e148..7beaef59faa12433419fa2a2b461868616d286f1 100644 (file)
@@ -149,25 +149,23 @@ Surface::~Surface ()
 {
        DEBUG_TRACE (DEBUG::MackieControl, "Surface::~Surface init\n");
 
-       // zero_all ();
+       port_connection.disconnect ();
 
-       // delete groups
+       if (input_source) {
+               g_source_destroy (input_source);
+               input_source = 0;
+       }
+
+       // delete groups (strips)
        for (Groups::iterator it = groups.begin(); it != groups.end(); ++it) {
                delete it->second;
        }
 
-       // delete controls
+       // delete controls (global buttons, master fader etc)
        for (Controls::iterator it = controls.begin(); it != controls.end(); ++it) {
                delete *it;
        }
 
-       port_connection.disconnect ();
-
-       if (input_source) {
-               g_source_destroy (input_source);
-               input_source = 0;
-       }
-
        delete _jog_wheel;
        delete _port;