From 861e5bc8a0ce6d4b0bc367e7f0f180fd4676aeeb Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 23 May 2026 21:24:55 +0200 Subject: [PATCH] Fix check for root item in container --- src/widgets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets.cpp b/src/widgets.cpp index a90e10b..7d36a19 100644 --- a/src/widgets.cpp +++ b/src/widgets.cpp @@ -172,7 +172,7 @@ void eventDispatcher(Context &ctx, int32_t eventId, EventPayload *eventPayload) WidgetHandle Widgets::container(WidgetHandle parentId, const char *text, const Rect &rect) { auto &ctx = TinyUi::getContext(); - if (ctx.mRoot != nullptr) { + if (ctx.mRoot == nullptr) { return WidgetHandle{WidgetHandle::InvalidId}; }