diff options
Diffstat (limited to 'src/usermanager.cpp')
-rw-r--r-- | src/usermanager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 4ebc3b583..3e5fee3fc 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -320,9 +320,11 @@ void UserManager::DoBackgroundUserStuff() /* * loop over all local users.. */ - for (LocalList::iterator i = local_users.begin(); i != local_users.end(); ++i) + for (LocalList::iterator i = local_users.begin(); i != local_users.end(); ) { + // It's possible that we quit the user below due to ping timeout etc. and QuitUser() removes it from the list LocalUser* curr = *i; + ++i; if (curr->CommandFloodPenalty || curr->eh.getSendQSize()) { |