diff options
author | Tor Andersson <tor@ghostscript.com> | 2009-07-02 20:05:01 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2009-07-02 20:05:01 +0200 |
commit | aeb450a0b00e0996f6f6e0f4e160c4ed0b595d90 (patch) | |
tree | 4bf017762ec77893e462044ce4e199e0a88f6568 /apps/pdfshow.c | |
parent | b23997bb49eb5ee3d7813fb993d42c1be043af74 (diff) | |
download | mupdf-aeb450a0b00e0996f6f6e0f4e160c4ed0b595d90.tar.xz |
Increment reference count of catalog and info objects when opening a pdf.
Diffstat (limited to 'apps/pdfshow.c')
-rw-r--r-- | apps/pdfshow.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/pdfshow.c b/apps/pdfshow.c index 981d5b4b..994a885c 100644 --- a/apps/pdfshow.c +++ b/apps/pdfshow.c @@ -45,9 +45,13 @@ void openxref(char *filename, char *password) /* TODO: move into mupdf lib, see pdfapp_open in pdfapp.c */ obj = fz_dictgets(xref->trailer, "Root"); xref->root = fz_resolveindirect(obj); + if (xref->root) + fz_keepobj(xref->root); obj = fz_dictgets(xref->trailer, "Info"); xref->info = fz_resolveindirect(obj); + if (xref->info) + fz_keepobj(xref->info); } void closexref() |