From 627836b745738183a25c356057eefe0582a615ff Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Tue, 22 Sep 2009 19:26:23 +0200 Subject: [PATCH] tree_unlink_node(): Also set sibling etc. to NULL within node itself --- uct/tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uct/tree.c b/uct/tree.c index dd3bfc0..fb3d432 100644 --- a/uct/tree.c +++ b/uct/tree.c @@ -447,6 +447,8 @@ tree_unlink_node(struct tree_node *node) ni = ni->sibling; ni->sibling = node->sibling; } + node->sibling = NULL; + node->parent = NULL; } void @@ -464,7 +466,6 @@ tree_promote_node(struct tree *tree, struct tree_node *node) tree_done_node(tree, tree->root); tree->root = node; board_symmetry_update(tree->board, &tree->root_symmetry, node->coord); - node->parent = NULL; } bool -- 2.11.4.GIT