From 00aa01109e13346f74cde55008d77e6635ab2a33 Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Mon, 14 Jul 2025 12:57:53 +0200 Subject: [PATCH] crash if last element is not root --- lib/ugui.c3l/src/ugui_core.c3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ugui.c3l/src/ugui_core.c3 b/lib/ugui.c3l/src/ugui_core.c3 index d25385b..c96725a 100644 --- a/lib/ugui.c3l/src/ugui_core.c3 +++ b/lib/ugui.c3l/src/ugui_core.c3 @@ -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();