From: compudj Date: Wed, 16 Mar 2005 14:49:16 +0000 (+0000) Subject: destroy tree : initial NULL test X-Git-Tag: v0.12.20~2598 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=0e8fbe23bcada91edead9534dcb42bdef681bc91;p=lttv.git destroy tree : initial NULL test git-svn-id: http://ltt.polymtl.ca/svn@891 04897980-b3bd-0310-b5e0-8ef037075253 --- 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);