diff --git a/core/GameConfigs.cpp b/core/GameConfigs.cpp index af424f7d..c40cc7aa 100644 --- a/core/GameConfigs.cpp +++ b/core/GameConfigs.cpp @@ -564,6 +564,7 @@ void GameConfigManager::CloseGameConfigFile(IGameConfig *cfg) if (pConfig->DecRefCount() == 0) { + sm_trie_delete(m_pLookup, pConfig->m_pFile); delete pConfig; } } diff --git a/core/GameConfigs.h b/core/GameConfigs.h index 78621d0e..ba267166 100644 --- a/core/GameConfigs.h +++ b/core/GameConfigs.h @@ -31,6 +31,7 @@ class CGameConfig : public ITextListener_SMC, public IGameConfig { + friend class GameConfigManager; public: CGameConfig(const char *file); ~CGameConfig();