mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/CrashHandler: Skip logging stack trace of the thread writing the crash log, it was launched by windows with same context as crashing thread
(cherry picked from commit dd34651f4d)
This commit is contained in:
@@ -428,6 +428,7 @@ void WheatyExceptionReport::printTracesForAllThreads(bool bWriteVariables)
|
||||
THREADENTRY32 te32;
|
||||
|
||||
DWORD dwOwnerPID = GetCurrentProcessId();
|
||||
DWORD dwCurrentTID = GetCurrentThreadId();
|
||||
m_hProcess = GetCurrentProcess();
|
||||
// Take a snapshot of all running threads
|
||||
HANDLE hThreadSnap = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
|
||||
@@ -451,7 +452,7 @@ void WheatyExceptionReport::printTracesForAllThreads(bool bWriteVariables)
|
||||
// associated with the specified process
|
||||
do
|
||||
{
|
||||
if (te32.th32OwnerProcessID == dwOwnerPID)
|
||||
if (te32.th32OwnerProcessID == dwOwnerPID && te32.th32ThreadID != dwCurrentTID)
|
||||
{
|
||||
CONTEXT context;
|
||||
context.ContextFlags = 0xffffffff;
|
||||
|
||||
Reference in New Issue
Block a user