summaryrefslogtreecommitdiff
path: root/src/cull_list.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cull_list.cpp')
-rw-r--r--src/cull_list.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cull_list.cpp b/src/cull_list.cpp
index 79c077ead..35fa44bfa 100644
--- a/src/cull_list.cpp
+++ b/src/cull_list.cpp
@@ -18,8 +18,12 @@
void CullList::Apply()
{
- for(std::vector<classbase*>::iterator i = list.begin(); i != list.end(); i++)
- delete *i;
+ for(std::set<classbase*>::iterator i = list.begin(); i != list.end(); i++)
+ {
+ classbase* c = *i;
+ c->cull();
+ delete c;
+ }
list.clear();
}