diff options
Diffstat (limited to 'src/pulse/context.c')
-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; |