Oh, forgot this - added some missing code for SourceMM 1.5 version of rev 1151
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401152
This commit is contained in:
parent
b372d50f3c
commit
b4ba442d3c
@ -138,12 +138,15 @@ void ConVarManager::OnUnlinkConCommandBase(PluginId id, ConCommandBase *pCommand
|
|||||||
if (id != g_PLID && !pCommand->IsCommand())
|
if (id != g_PLID && !pCommand->IsCommand())
|
||||||
{
|
{
|
||||||
ConVarInfo *pInfo;
|
ConVarInfo *pInfo;
|
||||||
|
const char *cvarName = pCommand->GetName();
|
||||||
HandleSecurity sec(NULL, g_pCoreIdent);
|
HandleSecurity sec(NULL, g_pCoreIdent);
|
||||||
bool handleExists = sm_trie_retrieve(m_ConVarCache, pCommand->GetName(), reinterpret_cast<void **>(&pInfo));
|
bool handleExists = sm_trie_retrieve(m_ConVarCache, cvarName, reinterpret_cast<void **>(&pInfo));
|
||||||
|
|
||||||
if (handleExists)
|
if (handleExists)
|
||||||
{
|
{
|
||||||
g_HandleSys.FreeHandle(pInfo->handle, &sec);
|
g_HandleSys.FreeHandle(pInfo->handle, &sec);
|
||||||
|
sm_trie_delete(m_ConVarCache, cvarName);
|
||||||
|
m_ConVars.remove(pInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user