From 3400b094ef19fc8fc1eae6d12fb33667cd5629b9 Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 21 Sep 2009 18:42:47 +0000 Subject: Allow objects to be added to cull list during apply - fixes user deletion on netsplit git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11754 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cull_list.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/cull_list.cpp') diff --git a/src/cull_list.cpp b/src/cull_list.cpp index 35fa44bfa..c45dff46c 100644 --- a/src/cull_list.cpp +++ b/src/cull_list.cpp @@ -18,12 +18,13 @@ void CullList::Apply() { - for(std::set::iterator i = list.begin(); i != list.end(); i++) + std::vector todel(list.begin(), list.end()); + list.clear(); + for(std::vector::iterator i = todel.begin(); i != todel.end(); i++) { classbase* c = *i; c->cull(); delete c; } - list.clear(); } -- cgit v1.3.1-10-gc9f91