diff --git a/Source/UI/Window/WindowMgrState.cpp b/Source/UI/Window/WindowMgrState.cpp index 199a65897..2924556f1 100644 --- a/Source/UI/Window/WindowMgrState.cpp +++ b/Source/UI/Window/WindowMgrState.cpp @@ -597,8 +597,8 @@ void UIWindowMgr::SaveVisibleWindowIds() { } this->savedWindowIds.clear(); - for (UIWindow* window : this->rendered) { - int id = window->geometry.id; + for (auto it = this->rendered.begin(); it != this->rendered.end(); ++it) { + int id = (*it)->geometry.id; if (id == 8) { if (this->itemWndVisible) { this->savedWindowIds.push_back(id);