Fix memory corruption due to concurrent QString operations
This commit is contained in:
parent
c35f7086a0
commit
b1232e0ed4
1 changed files with 1 additions and 1 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue