From 3c8a60944fc23c069acc5899eb186077c034dcce Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 2 Nov 2021 09:18:42 +0100 Subject: [PATCH] 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 --- src/pipewire/pipewire.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pipewire/pipewire.c b/src/pipewire/pipewire.c index b06b38a74..303f4b384 100644 --- a/src/pipewire/pipewire.c +++ b/src/pipewire/pipewire.c @@ -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;