1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-03-22 13:19:40 +01:00

Crash bug, I squash you.

Fixed bug where returning false in Load() after adding a Metamod event listener or hooking a function could cause a crash.

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40233
This commit is contained in:
Scott Ehlert 2006-07-20 10:53:06 +00:00
parent ff4adfe426
commit 5415033d4a
2 changed files with 6 additions and 0 deletions

@ -384,6 +384,10 @@ CPluginManager::CPlugin *CPluginManager::_Load(const char *file, PluginId source
if (pl->m_Lib && (pl->m_Status < Pl_Paused)) if (pl->m_Lib && (pl->m_Status < Pl_Paused))
{ {
pl->m_Events.clear();
g_SourceHook.UnloadPlugin(pl->m_Id);
UnregAllConCmds(pl);
dlclose(pl->m_Lib); dlclose(pl->m_Lib);
pl->m_Lib = NULL; pl->m_Lib = NULL;
pl->m_API = NULL; pl->m_API = NULL;

@ -4,6 +4,8 @@
- Fixed bug where Metamod:Source could load the wrong GameDLL and/or load more than one - Fixed bug where Metamod:Source could load the wrong GameDLL and/or load more than one
GameDLL. This issue occured in HL2 CTF, SourceForts, or any other mod that relied on GameDLL. This issue occured in HL2 CTF, SourceForts, or any other mod that relied on
files from another mod directory. files from another mod directory.
- Fixed bug where returning false in Load() after adding a Metamod event listener or
hooking a function could cause a crash.
2006/06/14 1.2.3: 2006/06/14 1.2.3:
- Added SourceHook API for manual recalls: RETURN_META_(VALUE_)MNEWPARAMS - Added SourceHook API for manual recalls: RETURN_META_(VALUE_)MNEWPARAMS