diff options
-rw-r--r-- | engines/macventure/gui.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index 14c99f6cd7..9e0a6e9f00 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<WindowData>::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; } } } |