mirror of https://github.com/OpenTTD/OpenTTD
Fix #7970: [Win32] Disable event loop on crash to prevent recursive faults
parent
f827bc8c1a
commit
b5ca2161d9
|
@ -540,6 +540,9 @@ void *_safe_esp = nullptr;
|
||||||
|
|
||||||
static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
|
static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
|
||||||
{
|
{
|
||||||
|
/* Disable our event loop. */
|
||||||
|
SetWindowLongPtr(GetActiveWindow(), GWLP_WNDPROC, (LONG_PTR)&DefWindowProc);
|
||||||
|
|
||||||
if (CrashLogWindows::current != nullptr) {
|
if (CrashLogWindows::current != nullptr) {
|
||||||
CrashLog::AfterCrashLogCleanup();
|
CrashLog::AfterCrashLogCleanup();
|
||||||
ExitProcess(2);
|
ExitProcess(2);
|
||||||
|
|
Loading…
Reference in New Issue