From a665980d5e6b7d050fc7c31a38a3ea7219e2fca3 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Thu, 23 Oct 2025 17:23:37 +0200 Subject: [PATCH] Erase the widget we want to attach rather than the widget we're attaching to --- 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();