summaryrefslogtreecommitdiff
path: root/modules/database/db_sql_live.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-02-14 20:57:40 -0500
committerAdam <Adam@anope.org>2013-02-14 20:57:40 -0500
commit391f2822c8f6da7d6ffa8114817a8baf2aa265d5 (patch)
treeb8c9c566481fe13083d12f0d750ba30ca3e87456 /modules/database/db_sql_live.cpp
parentf0875c5d85e0a6c1d878aed01673c0d909a8d488 (diff)
This Serialize::Destroy method isn't actually needed anymore. Fixes weirdness from a few Serializable items we had on the stack. Added a comment about why operator< in Reference fails.
Diffstat (limited to 'modules/database/db_sql_live.cpp')
-rw-r--r--modules/database/db_sql_live.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/database/db_sql_live.cpp b/modules/database/db_sql_live.cpp
index 9a769a35c..ae37a7a9b 100644
--- a/modules/database/db_sql_live.cpp
+++ b/modules/database/db_sql_live.cpp
@@ -156,7 +156,8 @@ class DBMySQL : public Module, public Pipe
Serialize::Type *s_type = obj->GetSerializableType();
if (s_type)
{
- this->RunQuery("DELETE FROM `" + this->prefix + s_type->GetName() + "` WHERE `id` = " + stringify(obj->id));
+ if (obj->id > 0)
+ this->RunQuery("DELETE FROM `" + this->prefix + s_type->GetName() + "` WHERE `id` = " + stringify(obj->id));
s_type->objects.erase(obj->id);
}
this->updated_items.erase(obj);