ui/common/document.c

changeset 1141
e37824dd7281
parent 1095
e519ecc27cfe
--- a/ui/common/document.c	Sun May 24 16:47:27 2026 +0200
+++ b/ui/common/document.c	Sun May 24 20:44:08 2026 +0200
@@ -45,8 +45,8 @@
     
     UiDoc *document = cxCalloc(a, sizeof(UiDoc) + size, 1);
     document->ctx = ctx;
-    ctx->self_doc = document;
-    return &document->doc;
+    ctx->self_doc = &document->doc;
+    return ctx->self_doc;
 }
 
 void ui_document_destroy(void *doc) {

mercurial