changeset 632:29bef008588e

Try to avoid deleting thread while OSC interface is still being set up
author Chris Cannam <cannam@all-day-breakfast.com>
date Fri, 09 Nov 2018 15:38:49 +0000
parents ca64cc9047d0
children 4612d44ae753 109a1dd59f45
files framework/MainWindowBase.cpp
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Thu Oct 18 13:22:16 2018 +0100
+++ b/framework/MainWindowBase.cpp	Fri Nov 09 15:38:49 2018 +0000
@@ -326,9 +326,17 @@
     delete m_recordTarget;
     
     delete m_viewManager;
+    delete m_midiInput;
+
+    disconnect(m_oscQueueStarter, 0, 0, 0);
+    m_oscQueueStarter->wait(1000);
+    if (m_oscQueueStarter->isRunning()) {
+        m_oscQueueStarter->terminate();
+        m_oscQueueStarter->wait(1000);
+    }
+    delete m_oscQueueStarter;
     delete m_oscQueue;
-    delete m_oscQueueStarter;
-    delete m_midiInput;
+    
     Profiles::getInstance()->dump();
 }