diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-09-17 01:37:23 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-09-17 01:37:23 +0200 |
commit | cdbeac6b6961b5e071250f539b7011efe65ef513 (patch) | |
tree | 6dc5c26bd0b2f0cc5457ce93dd8a8759ecae5776 | |
parent | 231c17be0330a3621f5249c5c7ea0ce521085c61 (diff) |
libpulse: as a special exception, don't require a non-NULL context in pa_context_errno
-rw-r--r-- | src/pulse/context.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pulse/context.c b/src/pulse/context.c index 894ab2e0..23ae30ce 100644 --- a/src/pulse/context.c +++ b/src/pulse/context.c @@ -1045,7 +1045,10 @@ pa_context_state_t pa_context_get_state(pa_context *c) { } int pa_context_errno(pa_context *c) { - pa_assert(c); + + if (!c) + return PA_ERR_INVALID; + pa_assert(PA_REFCNT_VALUE(c) >= 1); return c->error; |