diff --git a/source/ps/CConsole.cpp b/source/ps/CConsole.cpp index b3ede4aa48..c7e68ae24b 100644 --- a/source/ps/CConsole.cpp +++ b/source/ps/CConsole.cpp @@ -578,7 +578,7 @@ void CConsole::ProcessBuffer(const wchar_t* szLine) ENSURE(wcslen(szLine) < CONSOLE_BUFFER_SIZE); - if (!m_HistoryIgnoreDuplicates || m_BufHistory.front() != szLine) + if (!m_HistoryIgnoreDuplicates || m_BufHistory.empty() || m_BufHistory.front() != szLine) { m_BufHistory.push_front(szLine); SaveHistory(); // Do this each line for the moment; if a script causes