summaryrefslogtreecommitdiff
path: root/src/gui/tabbedcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/tabbedcontainer.cpp')
-rw-r--r--src/gui/tabbedcontainer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/tabbedcontainer.cpp b/src/gui/tabbedcontainer.cpp
index 3044122a..75977571 100644
--- a/src/gui/tabbedcontainer.cpp
+++ b/src/gui/tabbedcontainer.cpp
@@ -38,12 +38,12 @@ TabbedContainer::TabbedContainer():
TabbedContainer::~TabbedContainer()
{
std::vector<gcn::Widget*>::iterator i = mTabs.begin();
- while (i != mTabs.end()) {
+ for (i = mTabs.begin(); i != mTabs.end(); i++) {
remove(*i);
delete (*i);
- i = mTabs.erase(i);
}
+ mTabs.clear();
mContents.clear();
}