diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-12-13 12:39:29 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-12-16 02:16:58 +0100 |
commit | bf8fa993e6403991bfcad13ccfb2873e32c37194 (patch) | |
tree | 00cc6f7abbe44e5903223e4a84b6f1d045d0d324 /platform | |
parent | 718ce3051843a684084fb15d890aab8945605f60 (diff) | |
download | mupdf-bf8fa993e6403991bfcad13ccfb2873e32c37194.tar.xz |
gl: Print warning when link destinations cannot be found.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/gl/gl-main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c index 5cff5c3b..f708c760 100644 --- a/platform/gl/gl-main.c +++ b/platform/gl/gl-main.c @@ -590,7 +590,11 @@ static void do_links(fz_link *link, int xofs, int yofs) open_browser(link->uri); else { - jump_to_page(fz_resolve_link(ctx, doc, link->uri, NULL, NULL)); + int p = fz_resolve_link(ctx, doc, link->uri, NULL, NULL); + if (p >= 0) + jump_to_page(p); + else + fz_warn(ctx, "cannot find link destination '%s'", link->uri); ui_needs_update = 1; } } |