// failure in module constructor
if (newmod)
DoSafeUnload(newmod);
- delete newmod;
- delete newhandle;
+ else
+ delete newhandle;
LastModuleError = "Unable to load " + filename_str + ": " + modexcept.GetReason();
ServerInstance->Logs->Log("MODULE", DEFAULT, LastModuleError);
return false;
ServerInstance->GlobalCulls.Apply();
delete dll;
bool rv = ServerInstance->Modules->Load(name.c_str());
- callback->Call(rv);
+ if (callback)
+ callback->Call(rv);
ServerInstance->GlobalCulls.AddItem(this);
}
};