mirror of
https://github.com/anope/anope.git
synced 2026-06-27 09:46:38 +02:00
Delay running the type creation event until after initialisation.
Doing this during the ctor can run into circumstances where the vtable has not been fully initialised and the call gets routed to the pure virtual implementation causing a crash.
This commit is contained in:
@@ -222,6 +222,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u)
|
||||
for (auto &mods : EventHandlers)
|
||||
mods.push_back(m);
|
||||
|
||||
Serialize::CreateTypes();
|
||||
m->Prioritize();
|
||||
|
||||
FOREACH_MOD(OnModuleLoad, (u, m));
|
||||
|
||||
Reference in New Issue
Block a user