summaryrefslogtreecommitdiffstats
path: root/scene/gui/tree.h
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-08-28 12:03:57 +0200
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-08-28 12:40:26 +0200
commitcd4221c1e20353124f086111d8f575cc3da62d76 (patch)
tree180637eee6880428093846f4fe82a3765d6612fd /scene/gui/tree.h
parent108c603f91b94100a1adc989316a372f0a6f8989 (diff)
downloadredot-engine-cd4221c1e20353124f086111d8f575cc3da62d76.tar.gz
[Tree] Fix error when removing child from `Tree`
New `last_child` member was not properly updated
Diffstat (limited to 'scene/gui/tree.h')
-rw-r--r--scene/gui/tree.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index 9b1541f4b9..4518708685 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -178,6 +178,9 @@ private:
if (parent->first_child == this) {
parent->first_child = next;
}
+ if (parent->last_child == this) {
+ parent->last_child = prev;
+ }
}
}