aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/container.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/menu/container.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/menu/container.cpp b/src/menu/container.cpp
index 4ac26548..795d57ab 100644
--- a/src/menu/container.cpp
+++ b/src/menu/container.cpp
@@ -46,6 +46,11 @@ namespace usdx
Container::~Container()
{
+ for (std::list<DrawableControl*>::iterator next = controls.begin(), it = next++;
+ it != controls.end(); it = next++) {
+ (*it)->remove_parent();
+ }
+
controls.clear();
}