diff options
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-object.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/pdf/pdf-object.c b/source/pdf/pdf-object.c index 5ad50421..902b0645 100644 --- a/source/pdf/pdf-object.c +++ b/source/pdf/pdf-object.c @@ -197,7 +197,10 @@ pdf_obj * pdf_keep_obj(fz_context *ctx, pdf_obj *obj) { if (obj >= PDF_OBJ__LIMIT) + { + Memento_takeRef(obj); obj->refs ++; + } return obj; } @@ -1715,6 +1718,7 @@ pdf_drop_obj(fz_context *ctx, pdf_obj *obj) { if (obj >= PDF_OBJ__LIMIT) { + Memento_dropRef(obj); if (--obj->refs) return; if (obj->kind == PDF_ARRAY) |