diff options
-rw-r--r-- | source/pdf/pdf-xref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c index a67f6bc7..970a83aa 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -1610,7 +1610,7 @@ pdf_open_document_no_run(fz_context *ctx, const char *filename) pdf_document *pdf_specifics(fz_document *doc) { - return (pdf_document *)(doc->close == (void *)pdf_close_document ? doc : NULL); + return (pdf_document *)((doc && doc->close == (void *)pdf_close_document) ? doc : NULL); } pdf_document *pdf_create_document(fz_context *ctx) |