Browse Source

Fixed a bug

tree_alloc
Thomas Johnson 1 year ago
parent
commit
2046529ee6
  1. 2
      tree_alloc.c

2
tree_alloc.c

@ -416,7 +416,7 @@ void remove_node(TreeAlloc **root_ptr, TreeAlloc *to_remove) {
if (replace && parent_of_replace == NULL) {
replace->color = COLOR_BLACK;
} else if (do_repair) {
} else if (parent_of_replace != NULL && do_repair) {
repair_after_remove(root_ptr, parent_of_replace, replace);
}
#ifdef DEBUG

Loading…
Cancel
Save