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}; }