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:
Uli Schlachter
2012-02-04 14:14:16 +01:00
parent 233897b3a8
commit 1d16d1ce7d

View File

@@ -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++) {