Permalink
Browse files

Fix a crash when you delete a user with more than one attached client

Fixes #403
  • Loading branch information...
1 parent 8c46fa8 commit e7ff40f785096717f8897063c889c8f297bcac27 @kylef kylef committed Sep 17, 2013
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/User.cpp
View
@@ -112,9 +112,8 @@ CUser::~CUser() {
}
// Delete clients
- for (unsigned int c = 0; c < m_vClients.size(); c++) {
- CClient* pClient = m_vClients[c];
- CZNC::Get().GetManager().DelSockByAddr(pClient);
+ while (!m_vClients.empty()) {
+ CZNC::Get().GetManager().DelSockByAddr(m_vClients[0]);
}
m_vClients.clear();

0 comments on commit e7ff40f

Please sign in to comment.