move reset (deletion) of click_io and ltc_output objects until after we are disconnec...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 28 Oct 2019 17:15:07 +0000 (11:15 -0600)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 28 Oct 2019 19:40:18 +0000 (13:40 -0600)
We use those objects unconditionally and without caching inside process(), which could be invoked by the engine during their
deletion

libs/ardour/session.cc

index 6d698988f3400a13d61c0e55bb5ea74d27cedee1..c3035d4b5cbcfd6edf6c56b78d0f7798c3a9e175 100644 (file)
@@ -562,11 +562,6 @@ Session::destroy ()
        /* shutdown control surface protocols while we still have ports
         * and the engine to move data to any devices.
         */
-
-       /* remove I/O objects before unsetting the engine session */
-       _click_io.reset ();
-       _ltc_output.reset ();
-
        ControlProtocolManager::instance().drop_protocols ();
 
        /* stop auto dis/connecting */
@@ -582,6 +577,10 @@ Session::destroy ()
 
        Port::PortDrop (); /* EMIT SIGNAL */
 
+       /* remove I/O objects that we (the session) own */
+       _click_io.reset ();
+       _ltc_output.reset ();
+
        {
                Glib::Threads::Mutex::Lock lm (controllables_lock);
                for (Controllables::iterator i = controllables.begin(); i != controllables.end(); ++i) {