diff options
author | Marc-André Lureau <marc-andre.lureau@nokia.com> | 2009-03-16 16:39:28 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-03-23 19:38:46 +0100 |
commit | a467bec42352c8e86cbc4c680a19a376405946ba (patch) | |
tree | ea72f9c6dde1cbc327c792b52d8020a70917e63d /src/pulse/stream.c | |
parent | 08154554b0cdce6d16816536211718bf14ff33ff (diff) | |
download | pulseaudio-a467bec42352c8e86cbc4c680a19a376405946ba.tar.gz |
pulse: check context (do not user pstream when NULL)
Diffstat (limited to 'src/pulse/stream.c')
-rw-r--r-- | src/pulse/stream.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pulse/stream.c b/src/pulse/stream.c index 9a0ea0fd4..a7fccc864 100644 --- a/src/pulse/stream.c +++ b/src/pulse/stream.c @@ -948,6 +948,7 @@ static int create_stream( PA_CHECK_VALIDITY(s->context, s->context->version >= 12 || !(flags & PA_STREAM_VARIABLE_RATE), PA_ERR_NOTSUPPORTED); PA_CHECK_VALIDITY(s->context, s->context->version >= 13 || !(flags & PA_STREAM_PEAK_DETECT), PA_ERR_NOTSUPPORTED); + PA_CHECK_VALIDITY(s->context, s->context->state == PA_CONTEXT_READY, PA_ERR_BADSTATE); /* Althought some of the other flags are not supported on older * version, we don't check for them here, because it doesn't hurt * when they are passed but actually not supported. This makes |