diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-07-11 20:59:30 -0700 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-07-11 20:59:30 -0700 |
commit | 157bc4ef3bf11a0da25b2f97238c017f44f47085 (patch) | |
tree | 7fa08ea77376cc1b35056c7da8aca1ca5b43709d /src/utils | |
parent | f69cbdbdf7a0416202f882be8a65793fa57783c6 (diff) |
padsp: Handle eol in info callbacks correctly
When receiving an eol, the object will be NULL and we're not handling
this correctly. Thanks to Drew Ogle <dantealiegri@gmail.com> for
reporting this and providing a patch.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/padsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/padsp.c b/src/utils/padsp.c index ab9d18a3..2468d06f 100644 --- a/src/utils/padsp.c +++ b/src/utils/padsp.c @@ -1222,7 +1222,7 @@ fail: static void sink_info_cb(pa_context *context, const pa_sink_info *si, int eol, void *userdata) { fd_info *i = userdata; - if (!si || eol < 0) { + if (eol < 0) { i->operation_success = 0; pa_threaded_mainloop_signal(i->mainloop, 0); return; @@ -1244,7 +1244,7 @@ static void sink_info_cb(pa_context *context, const pa_sink_info *si, int eol, v static void source_info_cb(pa_context *context, const pa_source_info *si, int eol, void *userdata) { fd_info *i = userdata; - if (!si || eol < 0) { + if (eol < 0) { i->operation_success = 0; pa_threaded_mainloop_signal(i->mainloop, 0); return; |