diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-03-10 13:00:44 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-06-06 15:53:52 +0200 |
commit | f1f1aa2a8698ab414e8399104da0684d33836c36 (patch) | |
tree | d83abb08264b544df2b457608b565f4d08460356 | |
parent | fa321a6572354ab9d1b285dffc0c7eb08f7302a2 (diff) |
pulse - Fix useless assert
If stream connection failes, don't assume that stream is connected upon closing.
ALSA bug#3831:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3831
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-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); |