fixed bug in ucx_avl_remove

Mon, 18 May 2015 20:32:29 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Mon, 18 May 2015 20:32:29 +0200
changeset 202
4c84dd2408d7
parent 201
45810f5b7b84
child 203
3d999ea3f780

fixed bug in ucx_avl_remove

ucx/avl.c file | annotate | diff | comparison | revisions
--- a/ucx/avl.c	Mon May 18 20:17:16 2015 +0200
+++ b/ucx/avl.c	Mon May 18 20:32:29 2015 +0200
@@ -201,6 +201,9 @@
                 ucx_avl_connect(tree, p, n->right ? n->right:n->left, n->key);
             } else {
                 tree->root = n->right ? n->right : n->left;
+                if(tree->root) {
+                    tree->root->parent = NULL;
+                }
             }
             alfree(tree->allocator, n);
         }

mercurial