Console: Can't deallocate temp entries, so don't even try

This commit is contained in:
def 2019-04-10 23:31:44 +02:00
parent ab9912c9c1
commit b91530eedc

View file

@ -862,7 +862,9 @@ CConsole::~CConsole()
CCommand *pNext = pCommand->m_pNext;
if(pCommand->m_pfnCallback == Con_Chain)
delete static_cast<CChain *>(pCommand->m_pUserData);
delete pCommand;
// Temp commands are on m_TempCommands heap, so don't delete them
if(!pCommand->m_Temp)
delete pCommand;
pCommand = pNext;
}
}