From 23a9ce18807d0d89a24b1d579519e837e2982f6f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 17 Oct 2019 09:27:38 +0200 Subject: GRAPHICS: MACGUI: Fix crash when clicking on the top window --- graphics/macgui/macwindowmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'graphics/macgui') diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp index 338be38050..7e7c1b1627 100644 --- a/graphics/macgui/macwindowmanager.cpp +++ b/graphics/macgui/macwindowmanager.cpp @@ -435,7 +435,7 @@ void MacWindowManager::removeMarked() { // Do we need compact lastid? _lastId = 0; for (Common::HashMap::iterator lit = _windows.begin(); lit != _windows.end(); lit++) { - if (lit->_key > (uint)_lastId) + if (lit->_key >= (uint)_lastId) _lastId = lit->_key + 1; } } -- cgit v1.2.3