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:
Scott Ehlert 2007-07-23 18:56:20 +00:00
parent b372d50f3c
commit b4ba442d3c

View File

@ -138,12 +138,15 @@ void ConVarManager::OnUnlinkConCommandBase(PluginId id, ConCommandBase *pCommand
if (id != g_PLID && !pCommand->IsCommand())
{
ConVarInfo *pInfo;
const char *cvarName = pCommand->GetName();
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)
{
g_HandleSys.FreeHandle(pInfo->handle, &sec);
sm_trie_delete(m_ConVarCache, cvarName);
m_ConVars.remove(pInfo);
}
}
}