| Index: fpdfsdk/fpdfeditpage.cpp
|
| diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
|
| index 992f08eb8b5b1a7a10845154122e6bdc85af7cee..15c2cb69d4eab87db5403e011a1b6c937e91660f 100644
|
| --- a/fpdfsdk/fpdfeditpage.cpp
|
| +++ b/fpdfsdk/fpdfeditpage.cpp
|
| @@ -56,11 +56,8 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument() {
|
| }
|
|
|
| DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index) {
|
| - CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
|
| - if (!pDoc || page_index < 0 || page_index >= pDoc->GetPageCount())
|
| - return;
|
| -
|
| - pDoc->DeletePage(page_index);
|
| + if (UnderlyingDocumentType* pDoc = UnderlyingFromFPDFDocument(document))
|
| + pDoc->DeletePage(page_index);
|
| }
|
|
|
| DLLEXPORT FPDF_PAGE STDCALL FPDFPage_New(FPDF_DOCUMENT document,
|
|
|