diff options
author | Adam <Adam@anope.org> | 2012-12-28 11:17:01 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-12-28 11:17:01 -0500 |
commit | ae6ddf295af63e2e201863646f4a4b535a966096 (patch) | |
tree | bfc4c5e7d2bf161029e5a8a2fd7b82560b939843 /modules/database/db_sql_live.cpp | |
parent | b591e8cdc8b1bc40a6a59b54dcb6266d9656b616 (diff) |
fixup part of 379b2c, dont use iterators after theyre erased
Diffstat (limited to 'modules/database/db_sql_live.cpp')
-rw-r--r-- | modules/database/db_sql_live.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/database/db_sql_live.cpp b/modules/database/db_sql_live.cpp index 0461e40b9..156e6e120 100644 --- a/modules/database/db_sql_live.cpp +++ b/modules/database/db_sql_live.cpp @@ -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 { |