1
0
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:
Sadie Powell
2025-11-20 23:56:41 +00:00
parent 20ca0c76e0
commit 9256b051fc
3 changed files with 27 additions and 7 deletions
+1
View File
@@ -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));