From 92bf0a365a3a8390bb3f023458a9e62c31849628 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 27 Aug 2004 01:29:49 +0000 Subject: latency work major main loop bugfix git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@154 fefdeb5f-60dc-0310-8127-8f9354f1896f --- polyp/polyplib-context.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'polyp/polyplib-context.c') diff --git a/polyp/polyplib-context.c b/polyp/polyplib-context.c index 9acb2d70..7542dd9b 100644 --- a/polyp/polyplib-context.c +++ b/polyp/polyplib-context.c @@ -463,7 +463,10 @@ static void set_dispatch_callbacks(struct pa_operation *o) { struct pa_operation* pa_context_drain(struct pa_context *c, void (*cb) (struct pa_context*c, void *userdata), void *userdata) { struct pa_operation *o; - assert(c && c->ref >= 1 && c->state == PA_CONTEXT_READY); + assert(c && c->ref >= 1); + + if (c->state != PA_CONTEXT_READY) + return NULL; if (!pa_context_is_pending(c)) return NULL; -- cgit