From: Kern Sibbald Date: Sat, 31 Dec 2011 08:03:31 +0000 (+0100) Subject: Fix seg fault in plugin event loop X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=75816c92573df7fd2517a2b875a5d84497d8d996;p=bacula%2Fbacula Fix seg fault in plugin event loop --- diff --git a/bacula/src/filed/fd_plugins.c b/bacula/src/filed/fd_plugins.c index 210f931827..978b10b99c 100644 --- a/bacula/src/filed/fd_plugins.c +++ b/bacula/src/filed/fd_plugins.c @@ -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);