There should be no assumptions about what has been initialized when
the unlink hook is fired.
Change-Id: I7502f0e7a3d244413dd806bc8657014999c9b9b3
const char *role;
pa_sink *sink = sink_input->sink;
- pa_assert(sink);
+ if (!sink)
+ return PA_HOOK_OK;
+
+ if (!sink_input->proplist)
+ return PA_HOOK_OK;
role = pa_proplist_gets(sink_input->proplist, PA_PROP_MEDIA_ROLE);
const char *role;
pa_source *source = source_output->source;
- pa_assert(source);
+ if (!source)
+ return PA_HOOK_OK;
+
+ if (!source_output->proplist)
+ return PA_HOOK_OK;
role = pa_proplist_gets(source_output->proplist, PA_PROP_MEDIA_ROLE);