From e9aec0c0ef2474c6ca03bcd41fe58c5703490d9f Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 03:53:44 +0000 Subject: [PATCH] Decompile fn_17233 (UIWindowMgr::Shutdown) Batch #12983 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_17233 UIWindowMgr::Shutdown: logic confirmed by peer review Peer-reviewed-by: aDw, cremane, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Window/UIWindowMgr.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/UI/Window/UIWindowMgr.cpp b/Source/UI/Window/UIWindowMgr.cpp index 7b4cd7fc..eb9d30f9 100644 --- a/Source/UI/Window/UIWindowMgr.cpp +++ b/Source/UI/Window/UIWindowMgr.cpp @@ -932,11 +932,12 @@ void UIWindowMgr::Shutdown() { } for (UIWindow*& window : this->rendered) { - if (!this->modalWindows.empty() && this->modalWindows.back() && this->persistentWindows.find(window) != this->persistentWindows.end()) { + if (this->HasModalWindow() && this->persistentWindows.find(window) != this->persistentWindows.end()) { this->retainedPersistentWindow = true; - } else if (this->modalWindows.empty() || !this->modalWindows.back() || - std::find(this->modalWindows.begin(), this->modalWindows.end(), window) == this->modalWindows.end()) { - this->persistentWindows.erase(window); + } else if (!this->HasModalWindow() || std::find(this->modalWindows.begin(), this->modalWindows.end(), window) == this->modalWindows.end()) { + if (this->persistentWindows.find(window) != this->persistentWindows.end()) { + this->persistentWindows.erase(window); + } window->Slot11(); delete window; window = nullptr; @@ -959,7 +960,7 @@ void UIWindowMgr::Shutdown() { } this->rendered.clear(); this->retired.clear(); - this->snapRectangles.clear(); + this->snapRectangles.erase(this->snapRectangles.begin(), this->snapRectangles.end()); this->messageBoxes.clear(); this->ResetWindows();