From 1985fefcbdb7fbcd19a240ce6676c133024b434d Mon Sep 17 00:00:00 2001 From: Dunedan Date: Thu, 22 May 2025 18:08:29 +0200 Subject: [PATCH] Fix a crash of the debug console This fixes a crash when pyrogenesis got compiled with certain compilers, whenever a command is entered in the console, while no console.txt log exists. Fixes #7964 --- source/ps/CConsole.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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