From: malc Date: Sat, 1 Jun 2013 22:43:03 +0000 (+0400) Subject: Fix ghosting and double destruction X-Git-Tag: v16~23 X-Git-Url: https://repo.or.cz/w/llpp.git/commitdiff_plain/71a64f6a5e926a5e4e1509a710d41e600e20b912 Fix ghosting and double destruction --- 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: