Index: fpdfsdk/src/fpdf_dataavail.cpp |
diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp |
index d3b44160a8104898b88eb1545a0107371ffd9925..1b8162a403a2b98e3d4ef0f43e60b8eff077f10c 100644 |
--- a/fpdfsdk/src/fpdf_dataavail.cpp |
+++ b/fpdfsdk/src/fpdf_dataavail.cpp |
@@ -119,9 +119,9 @@ FPDFAvail_GetDocument(FPDF_AVAIL avail, FPDF_BYTESTRING password) { |
} |
DLLEXPORT int STDCALL FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc) { |
- if (doc == NULL) |
+ CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(doc); |
+ if (!doc) |
return 0; |
- CPDF_Document* pDoc = ((CPDFXFA_Document*)doc)->GetPDFDoc(); |
return ((CPDF_Parser*)pDoc->GetParser())->GetFirstPageNo(); |
Lei Zhang
2015/10/15 22:44:26
BTW, this cast is pointless. I need some shades so
Tom Sepez
2015/10/15 23:18:09
Done. Also a subtle error where the !pDoc not !do
|
} |