]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix seg fault in plugin event loop
authorKern Sibbald <kern@sibbald.com>
Sat, 31 Dec 2011 08:03:31 +0000 (09:03 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:50:20 +0000 (14:50 +0200)
bacula/src/filed/fd_plugins.c

index 210f931827b9ffcb04303f331880619bce19affd..978b10b99cfd128f6db396892177358529c3875e 100644 (file)
@@ -216,7 +216,7 @@ void generate_plugin_event(JCR *jcr, bEventType eventType, void *value)
          continue;
       }
       plugin_ctx = &plugin_ctx_list[i++];
-      if (is_plugin_disabled(plugin_ctx)) {
+      if (!plugin_ctx || is_plugin_disabled(plugin_ctx)) {
          continue;
       }
       rc = plug_func(plugin)->handlePluginEvent(plugin_ctx, &event, value);