--- a/ui/common/object.c Sun Oct 06 18:43:06 2024 +0200 +++ b/ui/common/object.c Sun Oct 20 21:24:13 2024 +0200 @@ -51,8 +51,10 @@ UiObject* uic_object_new(UiObject *toplevel, UIWIDGET widget) { - UiContext *ctx = toplevel->ctx; - + return uic_ctx_object_new(toplevel->ctx, widget); +} + +UiObject* uic_ctx_object_new(UiContext *ctx, UIWIDGET widget) { UiObject *newobj = cxCalloc(ctx->allocator, 1, sizeof(UiObject)); newobj->ctx = ctx; newobj->widget = widget;