mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-02 22:06:14 +00:00
Fix memory corruption due to concurrent QString operations
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user