1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 18:56:39 +02:00

Use safe iteration when deleting servers off of hubs

This commit is contained in:
Adam
2010-10-05 16:16:39 -04:00
parent 00ed18b421
commit acec166702
+2 -2
View File
@@ -110,8 +110,8 @@ Server::~Server()
if (this->UplinkServer)
this->UplinkServer->DelLink(this);
for (std::vector<Server *>::iterator it = this->Links.begin(), it_end = this->Links.end(); it != it_end; ++it)
delete *it;
for (unsigned i = this->Links.size(); i > 0; --i)
delete this->Links[i - 1];
}
/** Delete this server with a reason