From fb51a9744d6d356371b2ad73f2d3da972012be1f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 8 Nov 2017 17:20:04 +0100 Subject: Be a bit paranoid. We currently don't handle errors here, but if we do in the future we don't want stale pointers lying around. --- platform/gl/gl-main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c index 4b7ee779..8aa8fd2b 100644 --- a/platform/gl/gl-main.c +++ b/platform/gl/gl-main.c @@ -275,8 +275,11 @@ void load_page(void) fz_invert_matrix(&page_inv_ctm, &page_ctm); fz_drop_stext_page(ctx, text); + text = NULL; fz_drop_link(ctx, links); + links = NULL; fz_drop_page(ctx, page); + page = NULL; page = fz_load_page(ctx, doc, currentpage); links = fz_load_links(ctx, page); -- cgit v1.2.3