summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-11-08 17:20:04 +0100
committerTor Andersson <tor.andersson@artifex.com>2017-11-08 17:57:09 +0100
commitfb51a9744d6d356371b2ad73f2d3da972012be1f (patch)
tree21dc4c604cc6b49ac167fcd87be05800eca30819
parenta0f531e2492bd6d19edab9ca2e9f19f2284b0796 (diff)
downloadmupdf-fb51a9744d6d356371b2ad73f2d3da972012be1f.tar.xz
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.
-rw-r--r--platform/gl/gl-main.c3
1 files changed, 3 insertions, 0 deletions
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);