From 913e653f5b6761e01f4e09105f918a752e4cca95 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 3 Jan 2014 19:11:49 +0200 Subject: [PATCH] Add deadlock counter to prevent endless loop (issue #73) --- code/nel/src/gui/widget_manager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index 3ec11f215..ccfa14c63 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -1094,7 +1094,10 @@ namespace NLGUI bool updateCoordCalled= false; // updateCoords the window only if the master group is his parent and if need it // do it until updateCoords() no more invalidate coordinates!! - while (pIG->getParent()==rMG.Group && (pIG->getInvalidCoords()>0)) + + // add deadlock counter to prevent endless loop (Issue #73: web browser long scroll lockup) + int deadlock = 10; + while (--deadlock > 0 && pIG->getParent()==rMG.Group && (pIG->getInvalidCoords()>0)) { bRecomputeCtrlUnderPtr = true; // Update as many pass wanted (3 time for complex resizing, 1 for scroll for example)