]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/plugins.c
Add debug times, reduce size of two-pool-changer test
[bacula/bacula] / bacula / src / lib / plugins.c
index aa29ed97a512ea64088f7a7de64b357052960f07..84ea358ec80fa53e4d8c885ccf21f5bb523bffd5 100644 (file)
@@ -34,7 +34,7 @@
 #include "plugins.h"
 
 /* All loaded plugins */
-alist *plugin_list;
+alist *plugin_list = NULL;
 
 /*
  * Create a new plugin "class" entry and enter it in the
@@ -165,6 +165,9 @@ void unload_plugins()
 #ifndef HAVE_WIN32
    Plugin *plugin;
 
+   if (!plugin_list) {
+      return;
+   }
    foreach_alist(plugin, plugin_list) {
       /* Shut it down and unload it */
       plugin->unloadPlugin();