mixer: check for init() failures

When the init() method of a mixer plugin fails, mixer_new()
dereferences the NULL pointer.
This commit is contained in:
Max Kellermann 2009-03-07 15:50:26 +01:00
parent 9ed409cdcc
commit a547d24eb2
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}