crash if last element is not root

This commit is contained in:
Alessandro Mauri 2025-07-14 12:57:53 +02:00
parent 5e68671828
commit 00aa01109e

View File

@ -250,7 +250,7 @@ fn void? Ctx.frame_end(&ctx)
{
// FIXME: this is not guaranteed to be root. the user might forget to close a div or some other element
Elem* root = ctx.get_active_div()!;
root.div.layout = LAYOUT_ROW;
if (root.id != ROOT_ID) return WRONG_ID?;
// 1. clear the tree
ctx.tree.nuke();