diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2016-03-15 16:33:22 -0700 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-04-19 18:30:40 +0100 |
commit | 1bbde93ba39613877ded2015965aaab2341d3d36 (patch) | |
tree | f2a4936de895c6ddc40deb7bc93ccfb66de514d3 /source/fitz | |
parent | 335798189cbd40cd518ce49d1fa4c7eaa2811977 (diff) | |
download | mupdf-1bbde93ba39613877ded2015965aaab2341d3d36.tar.xz |
Add mutool merge
This commit adds a page merging tool. The tool demonstrates the
use of object grafting. The object grafting function recursively
goes through the object to add all referenced objects. A map is
maintained to ensure that objects that have already been copied are
not copied again.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/document.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/fitz/document.c b/source/fitz/document.c index 1719aaf6..7041616b 100644 --- a/source/fitz/document.c +++ b/source/fitz/document.c @@ -157,7 +157,8 @@ fz_new_document(fz_context *ctx, int size) fz_document * fz_keep_document(fz_context *ctx, fz_document *doc) { - ++doc->refs; + if (doc) + ++doc->refs; return doc; } |