aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/plugins.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/wsutil/plugins.c b/wsutil/plugins.c
index 5bb530dd23..12f85c962d 100644
--- a/wsutil/plugins.c
+++ b/wsutil/plugins.c
@@ -276,9 +276,9 @@ scan_plugins(plugin_load_failure_mode mode)
char *plugin_dir_path;
char *plugins_pers_dir;
WS_DIR *dir; /* scanned directory */
- WS_DIRENT *file; /* current file */
+ WS_DIRENT *file; /* current file */
- if (plugin_list == NULL) /* ensure scan_plugins is only run once */
+ if (plugin_list == NULL) /* only scan for plugins once */
{
/*
* Scan the global plugin directory.
@@ -288,6 +288,11 @@ scan_plugins(plugin_load_failure_mode mode)
* they will contain plugins in the case of an in-tree build.
*/
plugin_dir = get_plugin_dir();
+ if (plugin_dir == NULL)
+ {
+ /* We couldn't find the plugin directory. */
+ return;
+ }
if (running_in_build_directory())
{
if ((dir = ws_dir_open(plugin_dir, 0, NULL)) != NULL)