From c48069536922db4a227545fd915c37af141071e9 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 7 Aug 2013 19:40:05 +0000 Subject: Fix db_sql to not remove objects when shutting down, as some modules that unload before it when shutting down remove their items then --- modules/database/db_sql.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/database/db_sql.cpp') 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)); -- cgit