If we fail to connect to pulse, don't enumerate sinks or sources.
authorMichael Goddard <michael.goddard@nokia.com>
Thu, 24 Nov 2011 02:42:24 +0000 (12:42 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 24 Nov 2011 04:06:42 +0000 (05:06 +0100)
Otherwise the pulse client library dislikes having methods called
with a null context.

Change-Id: I96629065b7a0e36e0d10402526cb167e65458e27
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
src/plugins/pulseaudio/qpulseaudioengine.cpp

index 06afa5b..ead4b3b 100644 (file)
@@ -264,9 +264,11 @@ QPulseAudioEngine::QPulseAudioEngine(QObject *parent)
 
     pa_threaded_mainloop_unlock(m_mainLoop);
 
-    serverInfo();
-    sinks();
-    sources();
+    if (ok) {
+        serverInfo();
+        sinks();
+        sources();
+    }
 }
 
 QPulseAudioEngine::~QPulseAudioEngine()