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

@@ -2579,6 +2579,8 @@ EventState Window::HandleEditBoxKey(int wid, WChar key, uint16 keycode)
*/
void HandleKeypress(uint keycode, WChar key)
{
if (InEventLoopPostCrash()) return;
/* World generation is multithreaded and messes with companies.
* But there is no company related window open anyway, so _current_company is not used. */
assert(HasModalProgress() || IsLocalCompany());
@@ -2783,6 +2785,8 @@ static void HandleKeyScrolling()
static void MouseLoop(MouseClick click, int mousewheel)
{
if (InEventLoopPostCrash()) return;
/* World generation is multithreaded and messes with companies.
* But there is no company related window open anyway, so _current_company is not used. */
assert(HasModalProgress() || IsLocalCompany());
@@ -2872,6 +2876,8 @@ static void MouseLoop(MouseClick click, int mousewheel)
*/
void HandleMouseEvents()
{
if (InEventLoopPostCrash()) return;
/* World generation is multithreaded and messes with companies.
* But there is no company related window open anyway, so _current_company is not used. */
assert(HasModalProgress() || IsLocalCompany());
@@ -2979,6 +2985,8 @@ static void CheckSoftLimit()
*/
void InputLoop()
{
if (InEventLoopPostCrash()) return;
/* World generation is multithreaded and messes with companies.
* But there is no company related window open anyway, so _current_company is not used. */
assert(HasModalProgress() || IsLocalCompany());