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
     1.1 --- a/ucx/avl.c	Mon May 18 20:17:16 2015 +0200
     1.2 +++ b/ucx/avl.c	Mon May 18 20:32:29 2015 +0200
     1.3 @@ -201,6 +201,9 @@
     1.4                  ucx_avl_connect(tree, p, n->right ? n->right:n->left, n->key);
     1.5              } else {
     1.6                  tree->root = n->right ? n->right : n->left;
     1.7 +                if(tree->root) {
     1.8 +                    tree->root->parent = NULL;
     1.9 +                }
    1.10              }
    1.11              alfree(tree->allocator, n);
    1.12          }

mercurial