From 2553757922c23068af7e691372ad781a7a0898d1 Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Tue, 16 Apr 2013 14:56:35 +0200 Subject: [PATCH] alsa: Fix ELD access warning on shutdown The hdmi_eld_changed callback is called by alsa-lib at shutdown. In that case, just exit instead of trying to access something with already closed handles. Signed-off-by: David Henningsson --- src/modules/alsa/module-alsa-card.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c index 9b739dcac..b37eabc46 100644 --- a/src/modules/alsa/module-alsa-card.c +++ b/src/modules/alsa/module-alsa-card.c @@ -409,6 +409,9 @@ static int hdmi_eld_changed(snd_hctl_elem_t *elem, unsigned int mask) { pa_hdmi_eld eld; bool changed = false; + if (mask == SND_CTL_EVENT_MASK_REMOVE) + return 0; + p = find_port_with_eld_device(u->card->ports, device); if (p == NULL) { pa_log_error("Invalid device changed in ALSA: %d", device);