summaryrefslogtreecommitdiff
path: root/pdf/pdf_event.c
diff options
context:
space:
mode:
authorPaul Gardiner <paulg.artifex@glidos.net>2012-09-19 15:03:37 +0100
committerPaul Gardiner <paulg.artifex@glidos.net>2012-09-19 15:03:37 +0100
commit5f8e096b9090577ed93072448339a6500a5178f3 (patch)
treeb99081a2aea2b3788d13720a0375658920fd418c /pdf/pdf_event.c
parent0a37a0c9098f2b2e50811055e4100872b3cad5ad (diff)
downloadmupdf-5f8e096b9090577ed93072448339a6500a5178f3.tar.xz
Forms: ensure result from alert callback is passed back to caller
Diffstat (limited to 'pdf/pdf_event.c')
-rw-r--r--pdf/pdf_event.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/pdf/pdf_event.c b/pdf/pdf_event.c
index 37f88b20..5be3534b 100644
--- a/pdf/pdf_event.c
+++ b/pdf/pdf_event.c
@@ -19,12 +19,16 @@ fz_alert_event *fz_access_alert_event(fz_doc_event *event)
void pdf_event_issue_alert(pdf_document *doc, fz_alert_event *alert)
{
- fz_alert_event_internal ievent;
- ievent.base.type = FZ_DOCUMENT_EVENT_ALERT;
- ievent.alert = *alert;
-
if (doc->event_cb)
+ {
+ fz_alert_event_internal ievent;
+ ievent.base.type = FZ_DOCUMENT_EVENT_ALERT;
+ ievent.alert = *alert;
+
doc->event_cb((fz_doc_event *)&ievent, doc->event_cb_data);
+
+ *alert = ievent.alert;
+ }
}
void pdf_set_doc_event_callback(pdf_document *doc, fz_doc_event_cb *fn, void *data)