ui/common/context.c

branch
newapi
changeset 335
91d4f0391282
parent 325
99a93a9250c4
child 337
2904fba2708b
--- a/ui/common/context.c	Sun Oct 13 14:02:43 2024 +0200
+++ b/ui/common/context.c	Sun Oct 13 14:34:12 2024 +0200
@@ -162,7 +162,7 @@
 
 static UiVar* ctx_getvar(UiContext *ctx, CxHashKey key) {
     UiVar *var = cxMapGet(ctx->vars, key);
-    if(!var) {
+    if(!var && ctx->documents) {
         CxIterator i = cxListIterator(ctx->documents);
         cx_foreach(void *, doc, i) {
             UiContext *subctx = ui_document_context(doc);

mercurial