summaryrefslogtreecommitdiff
path: root/tree/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'tree/tree.c')
-rw-r--r--tree/tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tree/tree.c b/tree/tree.c
index e59d0413..f667e39a 100644
--- a/tree/tree.c
+++ b/tree/tree.c
@@ -105,6 +105,9 @@ fz_removenode(fz_node *child)
if (parent->first == child)
{
parent->first = child->next;
+ if (parent->last == child)
+ parent->last = nil;
+ return;
}
prev = parent->first;