X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fperl.c;h=d2a00bfde5ec316e2482bbf7deb1148a7a13dac2;hb=1b10ab706f8b70ce2f086e59a54cc09d671ad989;hp=a1ac8d76aced8aa33c752009a033452d20008a4b;hpb=47fd864adf60f70628e516d933c859229ff70912;p=collectd.git diff --git a/src/perl.c b/src/perl.c index a1ac8d76..d2a00bfd 100644 --- a/src/perl.c +++ b/src/perl.c @@ -2616,6 +2616,12 @@ static int perl_config_plugin(pTHX_ oconfig_item_t *ci) { char *plugin; HV *config; + if (NULL == perl_threads) { + log_err("A `Plugin' block was encountered but no plugin was loaded yet. " + "Put the appropriate `LoadPlugin' option in front of it."); + return -1; + } + dSP; if ((1 != ci->values_num) || (OCONFIG_TYPE_STRING != ci->values[0].type)) {