diff --git a/src/engine/shared/console.cpp b/src/engine/shared/console.cpp index c91b7127c..8f8fd4631 100644 --- a/src/engine/shared/console.cpp +++ b/src/engine/shared/console.cpp @@ -862,7 +862,9 @@ CConsole::~CConsole() CCommand *pNext = pCommand->m_pNext; if(pCommand->m_pfnCallback == Con_Chain) delete static_cast(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; } }