From 4ebbd15894d60c4efd875174fc38730ab65dad00 Mon Sep 17 00:00:00 2001 From: Gedalia Pasternak Date: Wed, 24 Jan 2024 11:27:08 -0500 Subject: [PATCH] add win32 fix. --- public/client/TracyProfiler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp index bcd9edf5..2e278daa 100644 --- a/public/client/TracyProfiler.cpp +++ b/public/client/TracyProfiler.cpp @@ -1459,6 +1459,10 @@ void Profiler::InstallCrashHandler() sigaction( SIGABRT, &crashHandler, &m_prevSignal.abrt ); #endif +#if defined _WIN32 && !defined TRACY_UWP && !defined TRACY_NO_CRASH_HANDLER + m_exceptionHandler = AddVectoredExceptionHandler( 1, CrashFilter ); +#endif + #ifndef TRACY_NO_CRASH_HANDLER m_crashHandlerInstalled = true; #endif @@ -1523,7 +1527,6 @@ void Profiler::SpawnWorkerThreads() # ifdef TRACY_HAS_CALLSTACK s_symbolThreadId = GetThreadId( s_symbolThread->Handle() ); # endif - m_exceptionHandler = AddVectoredExceptionHandler( 1, CrashFilter ); #endif #ifdef TRACY_HAS_CALLSTACK