summaryrefslogtreecommitdiff
path: root/src/gui/widgets/container.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/container.cpp')
-rw-r--r--src/gui/widgets/container.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/widgets/container.cpp b/src/gui/widgets/container.cpp
index 4b0fc60f7..e37bd5103 100644
--- a/src/gui/widgets/container.cpp
+++ b/src/gui/widgets/container.cpp
@@ -35,7 +35,11 @@ Container::~Container()
{
if (gui)
gui->removeDragged(this);
+ removeControls();
+}
+void Container::removeControls()
+{
while (!mWidgets.empty())
delete mWidgets.front();
}