From b4ba442d3c9392dae5e1093cd1578512bdcdbad1 Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Mon, 23 Jul 2007 18:56:20 +0000 Subject: [PATCH] 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 --- core/ConVarManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/ConVarManager.cpp b/core/ConVarManager.cpp index 1041a832..25c739a1 100644 --- a/core/ConVarManager.cpp +++ b/core/ConVarManager.cpp @@ -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(&pInfo)); + bool handleExists = sm_trie_retrieve(m_ConVarCache, cvarName, reinterpret_cast(&pInfo)); if (handleExists) { g_HandleSys.FreeHandle(pInfo->handle, &sec); + sm_trie_delete(m_ConVarCache, cvarName); + m_ConVars.remove(pInfo); } } }