X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fperl.c;h=14a7a8dfd9d5c350fb9fe1f27b09961fdb1668ba;hb=70ea9457f76d6cd953f2cbd64eeda0ff265f47db;hp=cf09586f71abceeb644cc1fd8d9083867fd6da82;hpb=1729122da5c83da932bbd72cb8c3d4e55b0623d8;p=collectd.git diff --git a/src/perl.c b/src/perl.c index cf09586f..14a7a8df 100644 --- a/src/perl.c +++ b/src/perl.c @@ -1643,15 +1643,15 @@ static XS (Collectd_plugin_dispatch_values) values = ST (/* stack index = */ 0); + if (NULL == values) + XSRETURN_EMPTY; + /* Make sure the argument is a hash reference. */ if (! (SvROK (values) && (SVt_PVHV == SvTYPE (SvRV (values))))) { log_err ("Collectd::plugin_dispatch_values: Invalid values."); XSRETURN_EMPTY; } - if (NULL == values) - XSRETURN_EMPTY; - ret = pplugin_dispatch_values (aTHX_ (HV *)SvRV (values)); if (0 == ret)