Win32: Don't hook assertion handler when debugging

Sven2 reports he can't get reliable stack traces from his debugger when
the assertion handler is installed. Since there's no need for the hook
when we're already running under a debugger, don't install it.
alternate-lights
Nicolas Hake 2015-02-21 19:40:35 +01:00
parent 0b55cea227
commit 39bbcbb9ee
1 changed files with 3 additions and 2 deletions

View File

@ -637,8 +637,9 @@ void InstallCrashHandler()
SetUnhandledExceptionFilter(GenerateDump);
#ifndef NDEBUG
// Hook _wassert/_assert
HookAssert(&assertion_handler);
// Hook _wassert/_assert, unless we're running under a debugger
if (!IsDebuggerPresent())
HookAssert(&assertion_handler);
#endif
}