diff framework/MainWindowBase.cpp @ 525:3ab6a5f7aca8 msvc2015_64

Further MSVC build stuff. Committing this as-is because it's building and running now, but there's a lot to tidy up.
author Chris Cannam
date Wed, 19 Oct 2016 17:33:32 +0100
parents b926f08909b8
children dd195633fc9f
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Tue Oct 18 15:56:21 2016 +0100
+++ b/framework/MainWindowBase.cpp	Wed Oct 19 17:33:32 2016 +0100
@@ -2246,13 +2246,17 @@
     if (m_soundOptions & WithAudioInput) {
         m_audioIO = breakfastquay::AudioFactory::
             createCallbackIO(m_recordTarget, m_playSource);
-        m_audioIO->suspend(); // start in suspended state
-        m_playSource->setSystemPlaybackTarget(m_audioIO);
+        if (m_audioIO) {
+            m_audioIO->suspend(); // start in suspended state
+            m_playSource->setSystemPlaybackTarget(m_audioIO);
+        }
     } else {
         m_playTarget = breakfastquay::AudioFactory::
             createCallbackPlayTarget(m_playSource);
-        m_playTarget->suspend(); // start in suspended state
-        m_playSource->setSystemPlaybackTarget(m_playTarget);
+        if (m_playTarget) {
+            m_playTarget->suspend(); // start in suspended state
+            m_playSource->setSystemPlaybackTarget(m_playTarget);
+        }
     }
 
     if (!m_playTarget && !m_audioIO) {