diff options
author | Max Kellermann <max@duempel.org> | 2009-03-07 15:50:26 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-07 15:50:26 +0100 |
commit | a547d24eb23dafd9f26af781e6fb147c433464b2 (patch) | |
tree | 42159096e0f4360ec8818f7705bdc6e79f7f372c /src | |
parent | 9ed409cdcc0b5f31f71be713074cded52d5ddb6b (diff) | |
download | mpd-a547d24eb23dafd9f26af781e6fb147c433464b2.tar.gz mpd-a547d24eb23dafd9f26af781e6fb147c433464b2.tar.xz mpd-a547d24eb23dafd9f26af781e6fb147c433464b2.zip |
mixer: check for init() failures
When the init() method of a mixer plugin fails, mixer_new()
dereferences the NULL pointer.
Diffstat (limited to '')
-rw-r--r-- | src/mixer_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mixer_api.c b/src/mixer_api.c index 9dc3e3b09..e5919627f 100644 --- a/src/mixer_api.c +++ b/src/mixer_api.c @@ -47,7 +47,7 @@ mixer_new(const struct mixer_plugin *plugin, const struct config_param *param) mixer = plugin->init(param); - assert(mixer->plugin == plugin); + assert(mixer == NULL || mixer->plugin == plugin); return mixer; } |