Blob Blame History Raw
If stream connection failes, don't assume that stream is connected upon closing.

diff -urp alsa-plugins-1.0.16.orig/pulse/pcm_pulse.c alsa-plugins-1.0.16/pulse/pcm_pulse.c
--- alsa-plugins-1.0.16.orig/pulse/pcm_pulse.c	2008-02-05 10:25:00.000000000 +0100
+++ alsa-plugins-1.0.16/pulse/pcm_pulse.c	2008-03-08 14:33:43.000000000 +0100
@@ -112,12 +112,14 @@ static int pulse_stop(snd_pcm_ioplug_t *
 
     pa_threaded_mainloop_lock(pcm->p->mainloop);
 
-    assert(pcm->stream);
-
     err = pulse_check_connection(pcm->p);
     if (err < 0)
         goto finish;
 
+    /* If stream connection fails, this gets called anyway */
+    if (pcm->stream == NULL)
+        goto finish;
+
     o = pa_stream_flush(pcm->stream, pulse_stream_success_cb, pcm->p);
     assert(o);