summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:50:50 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:50:50 +0000
commitbbaf9002a8cf427b2cbe93fd34a112e3d5f445ac (patch)
tree71ed941d06148a4999336c11d46305632ba30062 /src
parent94a601fb3b67e72e075af28174094117cd09f5f2 (diff)
Fix segfault due to invalidated iterator
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11641 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/userprocess.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index d66e548c9..4fcf87f66 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -142,9 +142,11 @@ void InspIRCd::DoBackgroundUserStuff()
/*
* loop over all local users..
*/
- for (std::vector<User*>::iterator count2 = this->Users->local_users.begin(); count2 != this->Users->local_users.end(); count2++)
+ std::vector<User*>::reverse_iterator count2 = this->Users->local_users.rbegin();
+ while (count2 != this->Users->local_users.rend())
{
User *curr = *count2;
+ count2++;
if (curr->quitting)
continue;