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:
parent
8cf206f2ee
commit
6c480d7db4
@ -255,19 +255,11 @@ static void
|
|||||||
pulse_mixer_close(G_GNUC_UNUSED struct mixer *data)
|
pulse_mixer_close(G_GNUC_UNUSED struct mixer *data)
|
||||||
{
|
{
|
||||||
struct pulse_mixer *pm=(struct pulse_mixer *) data;
|
struct pulse_mixer *pm=(struct pulse_mixer *) data;
|
||||||
if (pm->mainloop)
|
|
||||||
pa_threaded_mainloop_stop(pm->mainloop);
|
|
||||||
|
|
||||||
if (pm->context) {
|
pa_threaded_mainloop_stop(pm->mainloop);
|
||||||
pa_context_disconnect(pm->context);
|
pa_context_disconnect(pm->context);
|
||||||
pa_context_unref(pm->context);
|
pa_context_unref(pm->context);
|
||||||
pm->context = NULL;
|
pa_threaded_mainloop_free(pm->mainloop);
|
||||||
}
|
|
||||||
|
|
||||||
if (pm->mainloop) {
|
|
||||||
pa_threaded_mainloop_free(pm->mainloop);
|
|
||||||
pm->mainloop = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
pm->online = false;
|
pm->online = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user