X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fperl.c;h=f58e02ab4ae9077b4e73b012da340275fce29a6e;hb=4962291342f14fecbc6bb0240bd8ec7c76e2fc64;hp=ea53fbf30fbad5bb7645234d55069302e323a56d;hpb=f374b72032a227a75b6bc9ae574cd28abbc16f24;p=collectd.git diff --git a/src/perl.c b/src/perl.c index ea53fbf3..f58e02ab 100644 --- a/src/perl.c +++ b/src/perl.c @@ -2618,6 +2618,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)) {