diff options
author | Paul Gardiner <paulg.artifex@glidos.net> | 2012-08-07 10:11:28 +0100 |
---|---|---|
committer | Paul Gardiner <paulg.artifex@glidos.net> | 2012-08-07 10:11:28 +0100 |
commit | bdb93fc6ac5acc30f22a2f7b43cbfb9c1d2a902f (patch) | |
tree | 4d36c1bb752459d4e9873df5d9a0a3b108f0c0b3 /pdf/pdf_form.c | |
parent | bec275e1c32de2e766777fca14394206106bf60b (diff) | |
download | mupdf-bdb93fc6ac5acc30f22a2f7b43cbfb9c1d2a902f.tar.xz |
Forms: mark choice field dirty after value change (and fix error handling)
Diffstat (limited to 'pdf/pdf_form.c')
-rw-r--r-- | pdf/pdf_form.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pdf/pdf_form.c b/pdf/pdf_form.c index d1ca8474..d3bb4c40 100644 --- a/pdf/pdf_form.c +++ b/pdf/pdf_form.c @@ -2130,7 +2130,7 @@ void pdf_widget_choice_set_value(pdf_document *doc, fz_widget *tw, int n, char * if (!annot) return; - fz_var(opts); + fz_var(optarr); fz_var(opt); fz_try(ctx) { @@ -2146,9 +2146,11 @@ void pdf_widget_choice_set_value(pdf_document *doc, fz_widget *tw, int n, char * pdf_dict_puts(annot->obj, "V", optarr); pdf_drop_obj(optarr); + pdf_field_mark_dirty(ctx, annot->obj); } fz_catch(ctx) { + pdf_drop_obj(optarr); pdf_drop_obj(opt); fz_rethrow(ctx); } |