If a *_UNLINK_POST hook causes a sink-input/source-output's sink/source
to go away, the subsequent attempt to update the sink/source status will
cause an assert. We deal with this by checking the sink/source status
before trying to update it.
}
if (i->sink) {
- pa_sink_update_status(i->sink);
+ if (PA_SINK_IS_LINKED(pa_sink_get_state(i->sink)))
+ pa_sink_update_status(i->sink);
+
i->sink = NULL;
}
}
if (o->source) {
- pa_source_update_status(o->source);
+ if (PA_SOURCE_IS_LINKED(pa_source_get_state(o->source)))
+ pa_source_update_status(o->source);
+
o->source = NULL;
}