pulse_mixer: removed superfluous NULL checks in close()

When the MPD core knows that the pulse mixer is open, pm->mainloop and
pm->context must be non-NULL.
This commit is contained in:
Max Kellermann 2009-03-26 19:50:23 +01:00
parent 8cf206f2ee
commit 6c480d7db4

View File

@ -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;
}