summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 344be49)
raw | patch | inline | side by side (parent: 344be49)
author | Florian Forster <octo@collectd.org> | |
Sat, 23 Mar 2013 08:53:28 +0000 (09:53 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 23 Mar 2013 08:53:28 +0000 (09:53 +0100) |
Otherwise we might run into an assertion in the AVL tree. This can be
triggered e.g. when calling plugin_get_ds() from within a config
callback.
triggered e.g. when calling plugin_get_ds() from within a config
callback.
src/plugin.c | patch | blob | history |
diff --git a/src/plugin.c b/src/plugin.c
index 453e896bde1193fc6eca04177b347ae562715d2b..4c6a0322f18200f92caee47adbe41ab089ee94f5 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
{
data_set_t *ds;
+ if (data_sets == NULL)
+ {
+ ERROR ("plugin_get_ds: No data sets are defined yet.");
+ return (NULL);
+ }
+
if (c_avl_get (data_sets, name, (void *) &ds) != 0)
{
DEBUG ("No such dataset registered: %s", name);