]> git.itanic.dy.fi Git - sdl-planets/blobdiff - quadtree.c
quadtree: Unlink parent when rebalancing a subtree
[sdl-planets] / quadtree.c
index 30e306ed58983d70a371e2007063cb6bfc6332f8..1cb97563874d51770f73a89c7183883d934dbd43 100644 (file)
@@ -688,6 +688,7 @@ struct quadtree *quadtree_del(struct quadtree *node,
                        trap();
 
                parent = node->parent;
+               node->parent = NULL;
 
                /*
                 * The sub branch is now detached from the main