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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index a29d61db..d97fb7ee 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -2623,6 +2623,10 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
/* This message is sent from IO-thread and handled in main thread. */
pa_assert_ctl_context();
+ /* Make sure we're not messing with main thread when no longer linked */
+ if (!PA_SINK_IS_LINKED(s->state))
+ return 0;
+
pa_sink_get_volume(s, TRUE);
pa_sink_get_mute(s, TRUE);
return 0;