Skip to content
Browse files

fixup part of 379b2c, dont use iterators after theyre erased

  • Loading branch information...
1 parent b591e8c commit ae6ddf295af63e2e201863646f4a4b535a966096 @Adam- Adam- committed Dec 28, 2012
Showing with 1 addition and 4 deletions.
  1. +1 −4 modules/database/db_sql_live.cpp
View
5 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
{

0 comments on commit ae6ddf2

Please sign in to comment.
Something went wrong with that request. Please try again.