destroy tree : initial NULL test
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 16 Mar 2005 14:49:16 +0000 (14:49 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 16 Mar 2005 14:49:16 +0000 (14:49 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@891 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/lttv/filter.c

index 77c73e286c33a163860a8cbd2ccba7170313dc1f..0f339a59e313881a5b880cb0e05a72c3cd0bfebf 100644 (file)
@@ -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);
This page took 0.024119 seconds and 4 git commands to generate.