Merge branch 't/misc_cleanups'
[paraslash.git] / buffer_tree.c
index 9ae4d34..b1eeb03 100644 (file)
@@ -858,6 +858,8 @@ void btr_splice_out_node(struct btr_node *btrn)
                ch->parent = btrn->parent;
                if (btrn->parent)
                        list_move(&ch->node, &btrn->parent->children);
+               else
+                       list_del(&ch->node);
        }
        assert(list_empty(&btrn->children));
        btrn->parent = NULL;