diff options
Diffstat (limited to '')
-rw-r--r-- | src/menu/container.cpp | 5 |
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(); } |