From 3e0d21f0139269625f5abcf5e6a582d0867e6733 Mon Sep 17 00:00:00 2001 From: Pavel Rochnyack Date: Wed, 2 Aug 2017 12:15:50 +0700 Subject: [PATCH] perl plugin: Added check of proper interpreter initialization. Closes: #927 --- src/perl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/perl.c b/src/perl.c index d01f5c7c..66ad1819 100644 --- a/src/perl.c +++ b/src/perl.c @@ -2398,6 +2398,12 @@ static int perl_config_plugin(pTHX_ oconfig_item_t *ci) { char *plugin; HV *config; + if (NULL == perl_threads) { + log_err("No plugins was loaded yet! Put your plugin configuration block " + "after relevant `LoadPlugin' option."); + return -1; + } + dSP; if ((1 != ci->values_num) || (OCONFIG_TYPE_STRING != ci->values[0].type)) { -- 2.30.2