diff --git a/src/utils_threshold.c b/src/utils_threshold.c
index b036f993d72f5a0cf1c5018ec8633b2349281b08..03bc4233b330776fa3cc2ae232518b97579c10a2 100644 (file)
--- a/src/utils_threshold.c
+++ b/src/utils_threshold.c
threshold_t th;
+ if (threshold_tree == NULL)
+ {
+ threshold_tree = avl_create ((void *) strcmp);
+ if (threshold_tree == NULL)
+ {
+ ERROR ("ut_config: avl_create failed.");
+ return (-1);
+ }
+ }
+
memset (&th, '\0', sizeof (th));
th.min = NAN;
th.max = NAN;