From 71a64f6a5e926a5e4e1509a710d41e600e20b912 Mon Sep 17 00:00:00 2001 From: malc Date: Sun, 2 Jun 2013 02:43:03 +0400 Subject: [PATCH] Fix ghosting and double destruction --- link.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/link.c b/link.c index 196ef94..b9d07bd 100644 --- a/link.c +++ b/link.c @@ -2176,6 +2176,7 @@ static void droptext (struct page *page) } if (page->sheet) { fz_free_text_sheet (state.ctx, page->sheet); + page->sheet = NULL; } } @@ -2455,7 +2456,9 @@ CAMLprim value ml_postprocess (value ptr_v, value hlinks_v, highlightslinks (page, xoff, yoff, noff, targ, tlen, hfsize); noff = page->slinkcount; } - showsel (page, xoff, yoff); + if (page->tgen == state.gen) { + showsel (page, xoff, yoff); + } unlock ("ml_postprocess"); done: -- 2.11.4.GIT