diff options
author | Adam <Adam@anope.org> | 2013-08-07 19:40:05 +0000 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-08-07 19:40:05 +0000 |
commit | c48069536922db4a227545fd915c37af141071e9 (patch) | |
tree | 84c54c3088a28a3703adb8df26125db72dd7c9d4 /modules/database/db_sql.cpp | |
parent | 7f1b5552dc4ddccb688120d66946601fa695b650 (diff) |
Fix db_sql to not remove objects when shutting down, as some modules that unload before it when shutting down remove their items then
Diffstat (limited to 'modules/database/db_sql.cpp')
-rw-r--r-- | modules/database/db_sql.cpp | 2 |
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)); |