diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modmanager_dynamic.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp index 40bced74a..fa6b119a0 100644 --- a/src/modmanager_dynamic.cpp +++ b/src/modmanager_dynamic.cpp @@ -110,8 +110,8 @@ bool ModuleManager::Load(const char* filename) // 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; |