From b12b5130c99603f22534aba31615386b5fc40817 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 16 Jan 2009 16:00:12 +0100 Subject: mixer: check param==NULL in the alsa and oss mixer code When MPD starts without audio output configuration, the "param" variable is NULL. This triggers a segmentation fault in both mixer plugins. --- src/mixer/oss_mixer.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mixer/oss_mixer.c') diff --git a/src/mixer/oss_mixer.c b/src/mixer/oss_mixer.c index 75f1f5a0b..3f4b290d9 100644 --- a/src/mixer/oss_mixer.c +++ b/src/mixer/oss_mixer.c @@ -52,6 +52,10 @@ oss_mixer_configure(struct mixer_data *data, ConfigParam *param) { struct oss_mixer *om = (struct oss_mixer *) data; BlockParam *bp; + + if (param == NULL) + return; + bp = getBlockParam(param, "mixer_device"); if (bp) { if (om->device) -- cgit v1.2.3