160 cxListDestroy(ls); |
160 cxListDestroy(ls); |
161 } |
161 } |
162 |
162 |
163 static UiVar* ctx_getvar(UiContext *ctx, CxHashKey key) { |
163 static UiVar* ctx_getvar(UiContext *ctx, CxHashKey key) { |
164 UiVar *var = cxMapGet(ctx->vars, key); |
164 UiVar *var = cxMapGet(ctx->vars, key); |
165 if(!var) { |
165 if(!var && ctx->documents) { |
166 CxIterator i = cxListIterator(ctx->documents); |
166 CxIterator i = cxListIterator(ctx->documents); |
167 cx_foreach(void *, doc, i) { |
167 cx_foreach(void *, doc, i) { |
168 UiContext *subctx = ui_document_context(doc); |
168 UiContext *subctx = ui_document_context(doc); |
169 var = ctx_getvar(subctx, key); |
169 var = ctx_getvar(subctx, key); |
170 if(var) { |
170 if(var) { |