fix a segfault when a document does not have a catalog

Steve Langasek requested to merge vorlon/poppler:master into master

New poppler causes segfaults in r-cran-pdftools because the get_pdf_version() function now depends on the document having a non-null catalog, which is evidently not guaranteed to be the case. Maybe something is supposed to initialize it, but we can at least fix the segfault and restore compatibility with previous behavior by checking for a null catalog before dereferencing.

Merge request reports