From d586f643161ff243ca57926a203cf51b6a8b35cf Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Fri, 6 Jan 2006 13:25:29 +0000 Subject: [project @ 2006-01-06 13:25:29 by rjw] Update last child reference on delinking. This will fix the bug where parts of the tree became inaccessible after insertion. svn path=/import/netsurf/; revision=1992 --- desktop/tree.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'desktop') diff --git a/desktop/tree.c b/desktop/tree.c index ab75f1714..921ed8042 100644 --- a/desktop/tree.c +++ b/desktop/tree.c @@ -828,6 +828,8 @@ void tree_delink_node(struct node *node) { if (node->parent) { if (node->parent->child == node) node->parent->child = node->next; + if (node->parent->last_child == node) + node->parent->last_child = node->previous; if (node->parent->child == NULL) node->parent->expanded = false; node->parent = NULL; -- cgit v1.2.3