summaryrefslogtreecommitdiff
path: root/src/pulsecore/sink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/sink.c')
-rw-r--r--src/pulsecore/sink.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 0b44fc726..3f1ef725b 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -676,9 +676,10 @@ void pa_sink_unlink(pa_sink* s) {
* reversing pa_sink_put(). It also undoes the registrations
* already done in pa_sink_new()! */
- /* All operations here shall be idempotent, i.e. pa_sink_unlink()
- * may be called multiple times on the same sink without bad
- * effects. */
+ if (s->unlink_requested)
+ return;
+
+ s->unlink_requested = true;
linked = PA_SINK_IS_LINKED(s->state);