diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-11-20 09:39:49 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-11-20 09:39:49 -0800 |
commit | bd716fcf89f38bb82eb97ae73e9af60c2232328e (patch) | |
tree | 265fd408ab60a6ee2824b949eff048b97e6e23d8 /fpdfsdk/src/fpdf_dataavail.cpp | |
parent | 3ccd36892fe826e8f2ed8dde0819756ae3546733 (diff) | |
download | pdfium-bd716fcf89f38bb82eb97ae73e9af60c2232328e.tar.xz |
Update master fpdfsdk to match XFA
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1458853005 .
Diffstat (limited to 'fpdfsdk/src/fpdf_dataavail.cpp')
-rw-r--r-- | fpdfsdk/src/fpdf_dataavail.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp index 63f9b4cec0..9fe2fa82b1 100644 --- a/fpdfsdk/src/fpdf_dataavail.cpp +++ b/fpdfsdk/src/fpdf_dataavail.cpp @@ -141,9 +141,7 @@ FPDFAvail_GetDocument(FPDF_AVAIL avail, FPDF_BYTESTRING password) { DLLEXPORT int STDCALL FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc) { CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(doc); - if (!doc) - return 0; - return ((CPDF_Parser*)pDoc->GetParser())->GetFirstPageNo(); + return pDoc ? pDoc->GetParser()->GetFirstPageNo() : 0; } DLLEXPORT int STDCALL FPDFAvail_IsPageAvail(FPDF_AVAIL avail, |