From b1232e0ed483e97a60b3fb9cff0aaea515e68d1b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 24 Oct 2025 23:38:07 -0500 Subject: [PATCH] Fix memory corruption due to concurrent QString operations --- app/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.cpp b/app/main.cpp index fb09f5bf..c1ea8e4a 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -96,7 +96,7 @@ void logToLoggerStream(QString& message) #if defined(QT_DEBUG) && defined(Q_OS_WIN32) // Output log messages to a debugger if attached if (IsDebuggerPresent()) { - static QString lineBuffer; + thread_local QString lineBuffer; lineBuffer += message; if (message.endsWith('\n')) { OutputDebugStringW(lineBuffer.toStdWString().c_str());