aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer
diff options
context:
space:
mode:
Diffstat (limited to 'src/mixer')
-rw-r--r--src/mixer/pulse_mixer.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/mixer/pulse_mixer.c b/src/mixer/pulse_mixer.c
index b1067ae98..7999699be 100644
--- a/src/mixer/pulse_mixer.c
+++ b/src/mixer/pulse_mixer.c
@@ -255,19 +255,11 @@ static void
pulse_mixer_close(G_GNUC_UNUSED struct mixer *data)
{
struct pulse_mixer *pm=(struct pulse_mixer *) data;
- if (pm->mainloop)
- pa_threaded_mainloop_stop(pm->mainloop);
- if (pm->context) {
- pa_context_disconnect(pm->context);
- pa_context_unref(pm->context);
- pm->context = NULL;
- }
-
- if (pm->mainloop) {
- pa_threaded_mainloop_free(pm->mainloop);
- pm->mainloop = NULL;
- }
+ pa_threaded_mainloop_stop(pm->mainloop);
+ pa_context_disconnect(pm->context);
+ pa_context_unref(pm->context);
+ pa_threaded_mainloop_free(pm->mainloop);
pm->online = false;
}