summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@hotmail.com>2009-08-24 00:14:24 +0200
committerSebastian Rasmussen <sebras@hotmail.com>2009-08-24 00:14:24 +0200
commit46e660394c2127a6ce6a3e938902874e08873c70 (patch)
treeabe496193206e0920cb3f67a964f434e5d9d564f /apps
parent0ec9cab47d6dcfee0cd83649dc81e2088defb647 (diff)
downloadmupdf-46e660394c2127a6ce6a3e938902874e08873c70.tar.xz
Do not have pdfinfo or pdfshow die on corrupt page trees.
Diffstat (limited to 'apps')
-rw-r--r--apps/common/pdftool.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/common/pdftool.c b/apps/common/pdftool.c
index 025dcd9b..5961e3fb 100644
--- a/apps/common/pdftool.c
+++ b/apps/common/pdftool.c
@@ -71,7 +71,10 @@ void openxref(char *filename, char *password, int dieonbadpass)
error = pdf_getpagecount(xref, &pagecount);
if (error)
- die(error);
+ {
+ fz_catch(error, "cannot determine page count, attempting to continue.");
+ pagecount = 0;
+ }
}
void closexref(void)