alsa-mixer: check if mapping is NULL before using it
authorIgor V. Kovalenko <igor.v.kovalenko@gmail.com>
Mon, 7 Jun 2021 05:53:24 +0000 (08:53 +0300)
committerIgor V. Kovalenko <igor.v.kovalenko@gmail.com>
Mon, 7 Jun 2021 09:13:49 +0000 (12:13 +0300)
commit79cb1369fc4d22966cb65253e9da2ccda2f25b45
tree943fc28a5e746ea8e5b911fa999d120413985415
parent6d2a49a6a1eacc2096d0d9473a074421c181ab56
alsa-mixer: check if mapping is NULL before using it

Fix Debian bullseye bug where adding this line makes pulseaudio crash on startup

`load-module module-alsa-sink device=hw:1,0 control=Wave`

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=989103

Fixes: dacfcbb09 ("alsa-ucm: use the proper mixer name for ucm pcm sink/source")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/576>
src/modules/alsa/alsa-sink.c
src/modules/alsa/alsa-source.c