summaryrefslogtreecommitdiff
path: root/modules/database/db_sql_live.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-12-28 11:17:01 -0500
committerAdam <Adam@anope.org>2012-12-28 11:17:01 -0500
commitae6ddf295af63e2e201863646f4a4b535a966096 (patch)
treebfc4c5e7d2bf161029e5a8a2fd7b82560b939843 /modules/database/db_sql_live.cpp
parentb591e8cdc8b1bc40a6a59b54dcb6266d9656b616 (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.cpp5
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
{