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, 2 insertions, 0 deletions
diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp
index b575d3fd1..f6af798b4 100644
--- a/modules/database/db_sql.cpp
+++ b/modules/database/db_sql.cpp
@@ -197,6 +197,8 @@ class DBSQL : public Module, public Pipe
void OnSerializableDestruct(Serializable *obj) anope_override
{
+ if (this->shutting_down)
+ return;
Serialize::Type *s_type = obj->GetSerializableType();
if (s_type && obj->id > 0)
this->RunBackground("DELETE FROM `" + this->prefix + s_type->GetName() + "` WHERE `id` = " + stringify(obj->id));