diff -r 212b63dd61be -r 774b741984a2 ui/common/context.c --- a/ui/common/context.c Sun Sep 18 07:45:42 2016 +0200 +++ b/ui/common/context.c Sun Sep 18 08:39:37 2016 +0200 @@ -61,6 +61,10 @@ } void uic_context_set_document(UiContext *ctx, void *document) { + if(ctx->document == document) { + return; + } + UiContext *docctx = ui_document_context(document); if(!docctx) { return; @@ -228,6 +232,10 @@ } else { f->value = f->get(f); f->pos = f->position(f); + f->set = NULL; + f->get = NULL; + f->setposition = NULL; + f->position = NULL; } break; }