aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-utils-dump.c
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2018-09-07 16:13:55 +0200
committerThierry Bultel <thierry.bultel@iot.bzh>2018-09-07 16:13:55 +0200
commit9c0aa9f3073a37e961a90a973b8d007685c9e184 (patch)
tree7b4f9778a75958cff3c04b71af303992505629b2 /plugins/alsa/alsa-utils-dump.c
parent168e9288f1ff147d9aaa6064c3cc0308fd214a6a (diff)
fixed crash upon misconfiguration of capture/playback devices
The null pcmplug case was not correctly handled in various places. Also fixed some typos in the log Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'plugins/alsa/alsa-utils-dump.c')
-rw-r--r--plugins/alsa/alsa-utils-dump.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/alsa/alsa-utils-dump.c b/plugins/alsa/alsa-utils-dump.c
index 28ed83a..3007563 100644
--- a/plugins/alsa/alsa-utils-dump.c
+++ b/plugins/alsa/alsa-utils-dump.c
@@ -182,6 +182,11 @@ PUBLIC void AlsaDumpElemConfig(SoftMixerT *mixer, const char* info, const char*
PUBLIC void AlsaDumpCtlConfig(SoftMixerT *mixer, const char* info, snd_config_t *config, int indent) {
snd_config_iterator_t it, next;
+ if (!config) {
+ AFB_ApiNotice(mixer->api,"%s (%s): no config", __func__, info);
+ return;
+ }
+
// hugly hack to get minimalist indentation
char *pretty = alloca(indent + 1);