diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index 14c99f6cd743..9e0a6e9f0012 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -1129,12 +1129,11 @@ Common::Point Gui::localizeTravelledDistance(Common::Point point, WindowReferenc void Gui::removeInventoryWindow(WindowReference ref) { _inventoryWindows.remove_at(ref - kInventoryStart); - bool found = false; Common::List::iterator it; - for (it = _windowData->begin(); it != _windowData->end() && !found; it++) { + for (it = _windowData->begin(); it != _windowData->end(); it++) { if (it->refcon == ref) { _windowData->erase(it); - found = true; + break; } } }