pipewire: handle NULL plugin_dir

We can't load plugins when the plugin directory is unspecified, either
in config.h or with SPA_PLUGING_DIR in the environment.

Fixes #1774
This commit is contained in:
Wim Taymans 2021-11-02 09:18:42 +01:00
parent 9f134ee79d
commit 3c8a60944f

View file

@ -252,6 +252,10 @@ static struct spa_handle *load_spa_handle(const char *lib,
plugin = NULL;
res = -ENOENT;
if (sup->plugin_dir == NULL) {
pw_log_error("load lib: plugin directory undefined, set SPA_PLUGIN_DIR");
goto error_out;
}
while ((p = pw_split_walk(sup->plugin_dir, ":", &len, &state))) {
if ((plugin = open_plugin(&sup->registry, p, len, lib)) != NULL)
break;