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.
This commit is contained in:
Arun Raghavan 2011-03-28 16:39:53 +05:30 committed by Colin Guthrie
parent 77da2c4bcf
commit 628137a628

View file

@ -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);