diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-12-17 18:49:48 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-12-17 18:51:58 +0000 |
commit | 2f264787e9dac0fdcbadfe431f549f18b4d3aafb (patch) | |
tree | 0bb72e0e83ea650c688cca38ddcfb702acd62bc4 | |
parent | 35fc1addacc6bfad9ab52f125ba7079f651855a8 (diff) | |
download | mupdf-2f264787e9dac0fdcbadfe431f549f18b4d3aafb.tar.xz |
Bug 694810: Fix crash when clicking on mupdf window after failed page load.
If we have a NULL page, don't attempt to pass events to it.
-rw-r--r-- | source/pdf/pdf-form.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/pdf/pdf-form.c b/source/pdf/pdf-form.c index 0bf59cc5..2b48abec 100644 --- a/source/pdf/pdf-form.c +++ b/source/pdf/pdf-form.c @@ -740,6 +740,9 @@ int pdf_pass_event(pdf_document *doc, pdf_page *page, pdf_ui_event *ui_event) fz_point *pt = &(ui_event->event.pointer.pt); int changed = 0; + if (page == NULL) + return 0; + for (annot = page->annots; annot; annot = annot->next) { if (pt->x >= annot->pagerect.x0 && pt->x <= annot->pagerect.x1) |