summaryrefslogtreecommitdiff
path: root/modules/database/db_sql.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/database/db_sql.cpp')
-rw-r--r--modules/database/db_sql.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}