addendum to f56da9893: don't crash when s->sink is NULL

This commit is contained in:
Lennart Poettering 2009-02-12 03:42:28 +01:00
parent 1837a96e64
commit 752f815183

View file

@ -160,6 +160,9 @@ static pa_hook_result_t sink_input_unlink_hook_cb(pa_core *c, pa_sink_input *s,
pa_sink_input_assert_ref(s); pa_sink_input_assert_ref(s);
pa_assert(u); pa_assert(u);
if (!s->sink)
return PA_HOOK_OK;
if (pa_sink_check_suspend(s->sink) <= 0) { if (pa_sink_check_suspend(s->sink) <= 0) {
struct device_info *d; struct device_info *d;
if ((d = pa_hashmap_get(u->device_infos, s->sink))) if ((d = pa_hashmap_get(u->device_infos, s->sink)))