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:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user