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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user