diff options
author | glx <glx@openttd.org> | 2020-05-29 16:14:53 +0200 |
---|---|---|
committer | glx22 <glx22@users.noreply.github.com> | 2020-06-01 14:09:58 +0200 |
commit | b5ca2161d93e634f9938af7d9ca1fb1ddab3d501 (patch) | |
tree | d8e8361116d9a0e0e1de7800e2dee0107dd9bfad /src | |
parent | f827bc8c1ae83ea4f71347da9c8cb0468f386452 (diff) | |
download | openttd-b5ca2161d93e634f9938af7d9ca1fb1ddab3d501.tar.xz |
Fix #7970: [Win32] Disable event loop on crash to prevent recursive faults
Diffstat (limited to 'src')
-rw-r--r-- | src/os/windows/crashlog_win.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/os/windows/crashlog_win.cpp b/src/os/windows/crashlog_win.cpp index 9585bdf20..7a1a524aa 100644 --- a/src/os/windows/crashlog_win.cpp +++ b/src/os/windows/crashlog_win.cpp @@ -540,6 +540,9 @@ void *_safe_esp = nullptr; static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep) { + /* Disable our event loop. */ + SetWindowLongPtr(GetActiveWindow(), GWLP_WNDPROC, (LONG_PTR)&DefWindowProc); + if (CrashLogWindows::current != nullptr) { CrashLog::AfterCrashLogCleanup(); ExitProcess(2); |