From 0e8fbe23bcada91edead9534dcb42bdef681bc91 Mon Sep 17 00:00:00 2001 From: compudj Date: Wed, 16 Mar 2005 14:49:16 +0000 Subject: [PATCH] destroy tree : initial NULL test git-svn-id: http://ltt.polymtl.ca/svn@891 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/lttv/filter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ltt/branches/poly/lttv/lttv/filter.c b/ltt/branches/poly/lttv/lttv/filter.c index 77c73e28..0f339a59 100644 --- a/ltt/branches/poly/lttv/lttv/filter.c +++ b/ltt/branches/poly/lttv/lttv/filter.c @@ -107,6 +107,8 @@ LttvFilter* lttv_filter_tree_new() { * @param tree Tree which must be destroyed */ void lttv_filter_tree_destroy(LttvFilter* tree) { + + if(tree == NULL) return; if(tree->left == LTTV_TREE_LEAF) g_free(tree->l_child.leaf); else if(tree->left == LTTV_TREE_NODE) lttv_filter_tree_destroy(tree->l_child.t); -- 2.34.1