summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/canvas_item.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp
index cde3503bdf..541c7a0587 100644
--- a/scene/main/canvas_item.cpp
+++ b/scene/main/canvas_item.cpp
@@ -408,8 +408,8 @@ void CanvasItem::set_as_top_level(bool p_top_level) {
void CanvasItem::_toplevel_changed() {
// Inform children that toplevel status has changed on a parent.
- int childs = get_child_count();
- for (int i = 0; i < childs; i++) {
+ int children = get_child_count();
+ for (int i = 0; i < children; i++) {
CanvasItem *child = Object::cast_to<CanvasItem>(get_child(i));
if (child) {
child->_toplevel_changed_on_parent();