diff --git a/components/lua_ui/element.cpp b/components/lua_ui/element.cpp index 71f2ba9c96..baa3438982 100644 --- a/components/lua_ui/element.cpp +++ b/components/lua_ui/element.cpp @@ -99,7 +99,7 @@ namespace LuaUi if (parent) { auto children = parent->children(); - std::remove(children.begin(), children.end(), root); + std::erase(children, root); parent->setChildren(children); root->widget()->detachFromWidget(); }