diff --git a/components/lua_ui/element.cpp b/components/lua_ui/element.cpp index baa3438982..84383f89e1 100644 --- a/components/lua_ui/element.cpp +++ b/components/lua_ui/element.cpp @@ -280,6 +280,7 @@ namespace LuaUi auto children = parent->children(); auto it = std::find(children.begin(), children.end(), mRoot); mRoot = createWidget(layout(), 0); + assert(it != children.end()); *it = mRoot; parent->setChildren(children); mRoot->updateCoord();