diff --git a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp index a0d0f0ea0abc8..b2b66f2927644 100644 --- a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp @@ -192,6 +192,7 @@ const char *TargetThreadWindows::GetName() { if (SUCCEEDED(GetThreadDescription( m_host_thread.GetNativeThread().GetSystemHandle(), &pszThreadName))) { LLDB_LOGF(log, "GetThreadDescription: %ls", pszThreadName); + m_name.clear(); llvm::convertUTF16ToUTF8String( llvm::ArrayRef(reinterpret_cast(pszThreadName), wcslen(pszThreadName) * sizeof(wchar_t)),