diff options
Diffstat (limited to 'src/modmanager_dynamic.cpp')
-rw-r--r-- | src/modmanager_dynamic.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp index 27da56c69..5406cfd33 100644 --- a/src/modmanager_dynamic.cpp +++ b/src/modmanager_dynamic.cpp @@ -94,7 +94,10 @@ bool ModuleManager::Load(const std::string& filename, bool defer) { // failure in module constructor if (newmod) + { DoSafeUnload(newmod); + ServerInstance->GlobalCulls.AddItem(newhandle); + } else delete newhandle; LastModuleError = "Unable to load " + filename + ": " + modexcept.GetReason(); @@ -228,7 +231,7 @@ void ModuleManager::LoadAll() for(std::map<std::string, Module*>::iterator i = Modules.begin(); i != Modules.end(); i++) { Module* mod = i->second; - try + try { ServerInstance->Logs->Log("MODULE", DEBUG, "Initializing %s", i->first.c_str()); mod->init(); |