diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-12-12 12:41:25 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-12-12 12:58:35 +0100 |
commit | 83cff9734876e9454476086b79da15db1234e7b6 (patch) | |
tree | 7840be8993c6b01b8b41186256fe1d6b87f829a2 | |
parent | 026d81043a29c6be61c22b67c01d52366151098e (diff) | |
download | mupdf-83cff9734876e9454476086b79da15db1234e7b6.tar.xz |
pdf: Add missing prepare_object_for_alteration calls.
pdf_array_delete and pdf_dict_put_val_null weren't calling this function.
-rw-r--r-- | source/pdf/pdf-object.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/pdf/pdf-object.c b/source/pdf/pdf-object.c index 2b0526bd..51f6a679 100644 --- a/source/pdf/pdf-object.c +++ b/source/pdf/pdf-object.c @@ -797,6 +797,7 @@ pdf_array_delete(fz_context *ctx, pdf_obj *obj, int i) if (i < 0 || i >= ARRAY(obj)->len) fz_throw(ctx, FZ_ERROR_GENERIC, "index out of bounds"); + prepare_object_for_alteration(ctx, obj, NULL); pdf_drop_obj(ctx, ARRAY(obj)->items[i]); ARRAY(obj)->items[i] = 0; ARRAY(obj)->len--; @@ -1059,6 +1060,7 @@ pdf_dict_put_val_null(fz_context *ctx, pdf_obj *obj, int idx) if (idx < 0 || idx >= DICT(obj)->len) fz_throw(ctx, FZ_ERROR_GENERIC, "index out of bounds"); + prepare_object_for_alteration(ctx, obj, NULL); pdf_drop_obj(ctx, DICT(obj)->items[idx].v); DICT(obj)->items[idx].v = PDF_OBJ_NULL; } |