summaryrefslogtreecommitdiffstats
path: root/polyp/polyplib-context.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-08-27 01:29:49 +0000
committerLennart Poettering <lennart@poettering.net>2004-08-27 01:29:49 +0000
commit92bf0a365a3a8390bb3f023458a9e62c31849628 (patch)
tree23adcb50a438e13a0f3d46d492a2992b13b8f962 /polyp/polyplib-context.c
parentb6b428e5cbfc2440f5950c0744e15bc4d84e6b31 (diff)
latency work
major main loop bugfix git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@154 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/polyplib-context.c')
-rw-r--r--polyp/polyplib-context.c5
1 files changed, 4 insertions, 1 deletions
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;