summaryrefslogtreecommitdiff
path: root/apps/pdfapp.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/pdfapp.c')
-rw-r--r--apps/pdfapp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/pdfapp.c b/apps/pdfapp.c
index 4ec65148..145f49db 100644
--- a/apps/pdfapp.c
+++ b/apps/pdfapp.c
@@ -103,9 +103,9 @@ void pdfapp_open(pdfapp_t *app, char *filename, int fd)
*/
file = fz_openfile(fd);
- app->xref = pdf_openxref(file);
- if (!app->xref)
- pdfapp_error(app, fz_rethrow(-1, "cannot open PDF file '%s'", filename));
+ error = pdf_openxref(&app->xref, file);
+ if (error)
+ pdfapp_error(app, fz_rethrow(error, "cannot open document '%s'", filename));
fz_dropstream(file);
/*