summaryrefslogtreecommitdiffstats
path: root/src/zix/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/zix/tree.c')
-rw-r--r--src/zix/tree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/zix/tree.c b/src/zix/tree.c
index 1189230..d22f438 100644
--- a/src/zix/tree.c
+++ b/src/zix/tree.c
@@ -101,8 +101,10 @@ ZIX_API
void
zix_tree_free(ZixTree* t)
{
- zix_tree_free_rec(t, t->root);
- free(t);
+ if (t) {
+ zix_tree_free_rec(t, t->root);
+ free(t);
+ }
}
size_t