From 746395b55c51738da3c5deee3337ea34f5ef536b Mon Sep 17 00:00:00 2001 From: Drheisen1 Date: Thu, 18 Jun 2026 11:12:03 +0300 Subject: [PATCH 1/2] re-entrancy guard Search DRHEISEN1 --- src/MenuVisibilityManager.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/MenuVisibilityManager.cpp b/src/MenuVisibilityManager.cpp index e32e3aa..d4bbcb6 100644 --- a/src/MenuVisibilityManager.cpp +++ b/src/MenuVisibilityManager.cpp @@ -228,6 +228,17 @@ namespace QuickLoot { PROFILE_SCOPE; + // DRHEISEN1 -> re-entrancy guard. RequestShow() -> BlockConflictingInputs() + + static bool s_refreshing = false; + if (s_refreshing) { + return; + } + s_refreshing = true; + struct RefreshGuard { + ~RefreshGuard() { s_refreshing = false; } + } refreshGuard; + // Don't refresh while the console is open to work around the missing cursor bug // (any menu events while the console is open cause the cursor to disappear) if (RE::UI::GetSingleton()->IsMenuOpen(RE::Console::MENU_NAME)) { @@ -406,4 +417,4 @@ namespace QuickLoot } #pragma warning(pop) -} +} \ No newline at end of file From 882ffbe05f4316eb62cf4e72df9bd14c90b16a20 Mon Sep 17 00:00:00 2001 From: Drheisen1 Date: Fri, 19 Jun 2026 00:32:47 +0300 Subject: [PATCH 2/2] Update src/MenuVisibilityManager.cpp Co-authored-by: AtomCrafty --- src/MenuVisibilityManager.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/MenuVisibilityManager.cpp b/src/MenuVisibilityManager.cpp index d4bbcb6..af767c2 100644 --- a/src/MenuVisibilityManager.cpp +++ b/src/MenuVisibilityManager.cpp @@ -228,17 +228,15 @@ namespace QuickLoot { PROFILE_SCOPE; - // DRHEISEN1 -> re-entrancy guard. RequestShow() -> BlockConflictingInputs() - - static bool s_refreshing = false; - if (s_refreshing) { + // Prevent reentry to avoid infinite recursion + static bool refreshing = false; + if (refreshing) { return; } - s_refreshing = true; + refreshing = true; struct RefreshGuard { - ~RefreshGuard() { s_refreshing = false; } + ~RefreshGuard() { refreshing = false; } } refreshGuard; - // Don't refresh while the console is open to work around the missing cursor bug // (any menu events while the console is open cause the cursor to disappear) if (RE::UI::GetSingleton()->IsMenuOpen(RE::Console::MENU_NAME)) {