sensors plugin: Simple fix for temperature sensors.
[collectd.git] / src / perl.c
index 1ed9d00..0283757 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * collectd - src/perl.c
- * Copyright (C) 2007  Sebastian Harl
+ * Copyright (C) 2007, 2008  Sebastian Harl
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -940,6 +940,11 @@ static int perl_config_includedir (oconfig_item_t *ci)
                        || (OCONFIG_TYPE_STRING != ci->values[0].type))
                return 1;
 
+       if (NULL == aTHX) {
+               log_warn ("EnableDebugger has no effects if used after LoadPlugin.");
+               return 1;
+       }
+
        value = ci->values[0].value.string;
 
        if (NULL == perl) {