From 98ed6517ed51a6634fe78a265174250b598bc094 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Fri, 24 Oct 2025 19:17:50 +0300 Subject: [PATCH] Erase the widget we want to attach rather than the widget we're attaching to (#8758) Closes #8758 See merge request OpenMW/openmw!4962 (cherry-picked from 2708bfab9f45) --- components/lua_ui/widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lua_ui/widget.cpp b/components/lua_ui/widget.cpp index a126fd9f7b..d9465e0517 100644 --- a/components/lua_ui/widget.cpp +++ b/components/lua_ui/widget.cpp @@ -105,7 +105,7 @@ namespace LuaUi if (ext->mParent) { auto children = ext->mParent->children(); - std::erase(children, this); + std::erase(children, ext); ext->mParent->setChildren(children); } ext->detachFromParent();