1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 12:06:38 +02:00

db_redis: don't crash if destroying an object with no type

This commit is contained in:
Adam
2017-03-08 16:23:14 -05:00
parent 1a96390826
commit b57ef5d2c7
+12
View File
@@ -215,6 +215,18 @@ class DatabaseRedis : public Module, public Pipe
{
Serialize::Type *t = obj->GetSerializableType();
if (t == NULL)
{
/* This is probably the module providing the type unloading.
*
* The types get registered after the extensible container is
* registered so that unserialization on module load can insert
* into the extensible container. So, the type destructs prior to
* the extensible container, which then triggers this
*/
return;
}
std::vector<Anope::string> args;
args.push_back("HGETALL");
args.push_back("hash:" + t->GetName() + ":" + stringify(obj->id));