GRAPHICS: MACGUI: Fix crash when clicking on the top window

This commit is contained in:
Eugene Sandulenko 2019-10-17 09:27:38 +02:00
parent 0334d95364
commit 23a9ce1880

View File

@ -435,7 +435,7 @@ void MacWindowManager::removeMarked() {
// Do we need compact lastid? // Do we need compact lastid?
_lastId = 0; _lastId = 0;
for (Common::HashMap<uint, BaseMacWindow *>::iterator lit = _windows.begin(); lit != _windows.end(); lit++) { for (Common::HashMap<uint, BaseMacWindow *>::iterator lit = _windows.begin(); lit != _windows.end(); lit++) {
if (lit->_key > (uint)_lastId) if (lit->_key >= (uint)_lastId)
_lastId = lit->_key + 1; _lastId = lit->_key + 1;
} }
} }