summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-09-19 15:23:04 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-09-19 17:19:28 +0200
commitab1a420613dec93c686acbee2c165274e922f82a (patch)
tree1ddbe12764e32e89379896f4df34d439347e30ee /source
parent2707fa9e8e6d17d794330e719dec1b08161fb045 (diff)
downloadmupdf-ab1a420613dec93c686acbee2c165274e922f82a.tar.xz
Fix 698539: Don't use xps font if it could not be loaded.
xps_load_links_in_glyphs did not cope with font loading failures.
Diffstat (limited to 'source')
-rw-r--r--source/xps/xps-link.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/xps/xps-link.c b/source/xps/xps-link.c
index c07e0d76..c26a8d99 100644
--- a/source/xps/xps-link.c
+++ b/source/xps/xps-link.c
@@ -91,6 +91,8 @@ xps_load_links_in_glyphs(fz_context *ctx, xps_document *doc, const fz_matrix *ct
bidi_level = atoi(bidi_level_att);
font = xps_lookup_font(ctx, doc, base_uri, font_uri_att, style_att);
+ if (!font)
+ return;
text = xps_parse_glyphs_imp(ctx, doc, &local_ctm, font, fz_atof(font_size_att),
fz_atof(origin_x_att), fz_atof(origin_y_att),
is_sideways, bidi_level, indices_att, unicode_att);