aboutsummaryrefslogtreecommitdiff
path: root/source/Irrlicht/CGUIEnvironment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Irrlicht/CGUIEnvironment.cpp')
-rw-r--r--source/Irrlicht/CGUIEnvironment.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/source/Irrlicht/CGUIEnvironment.cpp b/source/Irrlicht/CGUIEnvironment.cpp
index 040cbff..0a12af3 100644
--- a/source/Irrlicht/CGUIEnvironment.cpp
+++ b/source/Irrlicht/CGUIEnvironment.cpp
@@ -387,11 +387,7 @@ void CGUIEnvironment::clear()
HoveredNoSubelement = 0;
}
- // get the root's children in case the root changes in future
- const core::list<IGUIElement*>& children = getRootGUIElement()->getChildren();
-
- while (!children.empty())
- (*children.getLast())->remove();
+ getRootGUIElement()->removeAllChildren();
}