diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-03-28 16:39:53 +0530 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2011-03-28 13:21:23 +0100 |
commit | 628137a62820b2659d41affe690cc8a1aedc89c0 (patch) | |
tree | 27bf9105b8f20994d71dfb3850e9dc779b369e67 /src/modules/module-cork-music-on-phone.c | |
parent | 77da2c4bcf843980fe27d4878a468741bdad3a38 (diff) |
cork-on-phone: Handle sink-inputs with NULL sinks
It's possible that by the time we receive the unlink hook, the given
sink-input's sink is set to NULL. Handle this gracefully.
Diffstat (limited to 'src/modules/module-cork-music-on-phone.c')
-rw-r--r-- | src/modules/module-cork-music-on-phone.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/module-cork-music-on-phone.c b/src/modules/module-cork-music-on-phone.c index b629f06f..5e6aa64b 100644 --- a/src/modules/module-cork-music-on-phone.c +++ b/src/modules/module-cork-music-on-phone.c @@ -138,6 +138,9 @@ static pa_hook_result_t process(struct userdata *u, pa_sink_input *i, pa_bool_t !pa_streq(role, "video")) return PA_HOOK_OK; + if (!i->sink) + return PA_HOOK_OK; + cork = shall_cork(i->sink, create ? NULL : i); apply_cork(u, i->sink, create ? NULL : i, cork); |