Add missing assertion

pull/3233/head
Andrei Kortunov 12 months ago
parent eedb96863e
commit d1a7dfee87

@ -280,6 +280,7 @@ namespace LuaUi
auto children = parent->children(); auto children = parent->children();
auto it = std::find(children.begin(), children.end(), mRoot); auto it = std::find(children.begin(), children.end(), mRoot);
mRoot = createWidget(layout(), 0); mRoot = createWidget(layout(), 0);
assert(it != children.end());
*it = mRoot; *it = mRoot;
parent->setChildren(children); parent->setChildren(children);
mRoot->updateCoord(); mRoot->updateCoord();

Loading…
Cancel
Save