diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-03-15 15:58:56 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-03-15 16:50:30 +0000 |
commit | fc73c03963f717ae0aed66fb99339244af499bb5 (patch) | |
tree | bdcd35125859bbc21c793070941d5b46782447ef /source/pdf | |
parent | 56cfb6a8e8b3b87bd2ff85c14a5635477141be4e (diff) | |
download | mupdf-fc73c03963f717ae0aed66fb99339244af499bb5.tar.xz |
Make PDF objects ref changes memento-trackable.
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) |