diff options
-rw-r--r-- | pulse/pcm_pulse.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pulse/pcm_pulse.c b/pulse/pcm_pulse.c index b6d5b46..15e3f50 100644 --- a/pulse/pcm_pulse.c +++ b/pulse/pcm_pulse.c @@ -112,12 +112,14 @@ static int pulse_stop(snd_pcm_ioplug_t *io) 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); |