From 391f2822c8f6da7d6ffa8114817a8baf2aa265d5 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 14 Feb 2013 20:57:40 -0500 Subject: 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. --- modules/database/db_sql.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/database/db_sql.cpp') diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp index 170f7a5c8..74166d6dc 100644 --- a/modules/database/db_sql.cpp +++ b/modules/database/db_sql.cpp @@ -185,7 +185,7 @@ class DBSQL : public Module, public Pipe void OnSerializableDestruct(Serializable *obj) anope_override { Serialize::Type *s_type = obj->GetSerializableType(); - if (s_type) + if (s_type && obj->id > 0) this->RunBackground("DELETE FROM `" + this->prefix + s_type->GetName() + "` WHERE `id` = " + stringify(obj->id)); this->updated_items.erase(obj); } -- cgit