diff options
-rw-r--r-- | fpdfsdk/fpdf_view.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp index 535f1e5036..cbbfd9c71d 100644 --- a/fpdfsdk/fpdf_view.cpp +++ b/fpdfsdk/fpdf_view.cpp @@ -308,16 +308,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_GetFileVersion(FPDF_DOCUMENT doc, FPDF_EXPORT unsigned long FPDF_CALLCONV FPDF_GetDocPermissions(FPDF_DOCUMENT document) { CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); - // https://bugs.chromium.org/p/pdfium/issues/detail?id=499 - if (!pDoc) { -#ifndef PDF_ENABLE_XFA - return 0; -#else // PDF_ENABLE_XFA - return 0xFFFFFFFF; -#endif // PDF_ENABLE_XFA - } - - return pDoc->GetUserPermissions(); + return pDoc ? pDoc->GetUserPermissions() : 0; } FPDF_EXPORT int FPDF_CALLCONV |