Fix recursive faults in Window crash logger due to message box event loop.

This commit is contained in:
Jonathan G Rennison
2017-02-19 12:56:56 +00:00
parent c2825c12ea
commit 102405e082
4 changed files with 28 additions and 0 deletions

View File

@@ -34,6 +34,8 @@
#undef strncat
#undef strncpy
bool _in_event_loop_post_crash;
static bool _has_console;
static bool _cursor_disable = true;
static bool _cursor_visible = true;
@@ -82,6 +84,7 @@ bool LoadLibraryList(Function proc[], const char *dll)
void ShowOSErrorBox(const char *buf, bool system)
{
_in_event_loop_post_crash = true;
MyShowCursor(true);
MessageBox(GetActiveWindow(), OTTD2FS(buf), _T("Error!"), MB_ICONSTOP);
}