diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-03-13 21:34:51 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-03-13 22:09:05 +0100 |
commit | 13011e00c6330e6d745f319766574d2cd78a1162 (patch) | |
tree | d6e7c2494036e39453705951785e2b85253ac741 /src/thread.h | |
parent | 062eeb9810b1c222cb9b0cb331041c0934e49682 (diff) | |
download | openttd-13011e00c6330e6d745f319766574d2cd78a1162.tar.xz |
Fix #8860: [Win32] Crashlog window wasn't reliably shown for crashes not on the main thread.
Diffstat (limited to 'src/thread.h')
-rw-r--r-- | src/thread.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/thread.h b/src/thread.h index f45694930..f2a47e7bf 100644 --- a/src/thread.h +++ b/src/thread.h @@ -11,6 +11,7 @@ #define THREAD_H #include "debug.h" +#include "crashlog.h" #include <system_error> #include <thread> @@ -47,6 +48,7 @@ inline bool StartNewThread(std::thread *thr, const char *name, TFn&& _Fx, TArgs& try { std::thread t([] (const char *name, TFn&& F, TArgs&&... A) { SetCurrentThreadName(name); + CrashLog::InitThread(); try { /* Call user function with the given arguments. */ F(A...); |