From 962ccc0b403fced611f36ea2f08fb72e2d4f8156 Mon Sep 17 00:00:00 2001 From: Wanne Date: Sat, 3 Jan 2009 17:49:43 +0000 Subject: [PATCH] Bugfix: Avoid Game to crash (stack overflow) when an error occurs and we have an active MOUSE_REGION git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2468 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Standard Gaming Platform/mousesystem.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Standard Gaming Platform/mousesystem.cpp b/Standard Gaming Platform/mousesystem.cpp index 1bc7bd56..c8cd2b9e 100644 --- a/Standard Gaming Platform/mousesystem.cpp +++ b/Standard Gaming Platform/mousesystem.cpp @@ -566,6 +566,12 @@ void MSYS_UpdateMouseRegion(void) BOOLEAN fFound=FALSE; found=FALSE; + // WANNE: Error handling Bugfix by birdflu (to avoid Stack Overflow) + if(guiCurrentScreen == ERROR_SCREEN) + { + return; + } + // Check previous region! if(MSYS_Mouse_Grabbed) {