mirror of
https://github.com/anope/anope.git
synced 2026-06-25 09:16:38 +02:00
fixup part of 379b2c, dont use iterators after theyre erased
This commit is contained in:
@@ -191,10 +191,7 @@ class DBMySQL : public Module, public Pipe
|
||||
clear_null = true;
|
||||
std::map<unsigned int, Serializable *>::iterator it = obj->objects.find(id);
|
||||
if (it != obj->objects.end())
|
||||
{
|
||||
obj->objects.erase(it);
|
||||
it->second->Destroy(); // This also tries to remove this object from the map
|
||||
}
|
||||
it->second->Destroy(); // This also removes this object from the map
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user