Skip to content
Permalink
Browse files

Reset variables in CModManager on mod load failure

  • Loading branch information...
botder committed Sep 8, 2019
1 parent 475544f commit dedbbaabc19aaaaef61af7d5a5887f173ce2434c
Showing with 3 additions and 0 deletions.
  1. +3 −0 Client/core/CModManager.cpp
@@ -142,6 +142,7 @@ CClientBase* CModManager::Load(const char* szName, const char* szArguments)
{
CCore::GetSingleton().GetConsole()->Printf("Unable to load %s's DLL (unknown mod)", szName, GetLastError());
FreeLibrary(m_hClientDLL);
m_hClientDLL = nullptr;
return NULL;
}

@@ -153,6 +154,8 @@ CClientBase* CModManager::Load(const char* szName, const char* szArguments)
{
CCore::GetSingleton().GetConsole()->Printf("Unable to load %s's DLL (unable to init, bad version?)", szName, GetLastError());
FreeLibrary(m_hClientDLL);
m_pClientBase = nullptr;
m_hClientDLL = nullptr;
return NULL;
}

0 comments on commit dedbbaa

Please sign in to comment.
You can’t perform that action at this time.