mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Fix a stupid bug in CUser::~CUser()
A CIRCNetwork's destructor removes the network from its associated user's list of networks. Now that you know this, stare at the diff until you figure out the problem. Yeah, "ouch". Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
@@ -89,11 +89,9 @@ CUser::CUser(const CString& sUserName)
|
||||
|
||||
CUser::~CUser() {
|
||||
// Delete networks
|
||||
for (unsigned int c = 0; c < m_vIRCNetworks.size(); c++) {
|
||||
CIRCNetwork* pNetwork = m_vIRCNetworks[c];
|
||||
delete pNetwork;
|
||||
while (!m_vIRCNetworks.empty()) {
|
||||
delete *m_vIRCNetworks.begin();
|
||||
}
|
||||
m_vIRCNetworks.clear();
|
||||
|
||||
// Delete clients
|
||||
for (unsigned int c = 0; c < m_vClients.size(); c++) {
|
||||
|
||||
Reference in New Issue
Block a user