summaryrefslogtreecommitdiffstats
path: root/src/avl.c
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2017-12-19 23:39:21 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2017-12-19 23:39:21 +0000
commit61aedf201c2c4bf0e5aa4db32e74f4d860b88593 (patch)
treebcf4f9a0cd8bc2daf38b2ff9f29bfcc1e5ed8968 /src/avl.c
parentNew upstream version 1.8.0+dfsg (diff)
downloadnetdata-61aedf201c2c4bf0e5aa4db32e74f4d860b88593.tar.xz
netdata-61aedf201c2c4bf0e5aa4db32e74f4d860b88593.zip
New upstream version 1.9.0+dfsgupstream/1.9.0+dfsg
Diffstat (limited to '')
-rw-r--r--src/avl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/avl.c b/src/avl.c
index 0ea119a7c..a2c6911e7 100644
--- a/src/avl.c
+++ b/src/avl.c
@@ -306,7 +306,10 @@ int avl_walker(avl *node, int (*callback)(void *entry, void *data), void *data)
}
int avl_traverse(avl_tree *t, int (*callback)(void *entry, void *data), void *data) {
- return avl_walker(t->root, callback, data);
+ if(t->root)
+ return avl_walker(t->root, callback, data);
+ else
+ return 0;
}
// ---------------------------