From 283fdc99a8293a97c08b9af111193b45e09f4bc5 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 19 Jul 2006 19:49:15 +0000 Subject: Safties git-svn-id: http://svn.inspircd.org/repository/branches/1_0_stable@4451 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/userprocess.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/userprocess.cpp') diff --git a/src/userprocess.cpp b/src/userprocess.cpp index 2f11528f3..9ae68cbfd 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -341,8 +341,14 @@ void DoBackgroundUserStuff(time_t TIME) { CullList GlobalGoners; + size_t f = local_users.size(); + for (std::vector::iterator count2 = local_users.begin(); count2 != local_users.end(); count2++) { + /* GRONK */ + if (f != local_users.size()) + break; + /* Sanity checks for corrupted iterators (yes, really) */ userrec* curr = NULL; @@ -401,6 +407,10 @@ void DoBackgroundUserStuff(time_t TIME) curr->nping = TIME+curr->pingmax; } + /* GANK */ + if (f != local_users.size()) + break; + /* * We can flush the write buffer as the last thing we do, because if they * match any of the above conditions its no use flushing their buffer anyway. -- cgit v1.3.1-10-gc9f91