diff options
Diffstat (limited to 'fpdfsdk/src/fpdfeditimg.cpp')
-rw-r--r-- | fpdfsdk/src/fpdfeditimg.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/src/fpdfeditimg.cpp b/fpdfsdk/src/fpdfeditimg.cpp index 269b382d89..09295aa3c4 100644 --- a/fpdfsdk/src/fpdfeditimg.cpp +++ b/fpdfsdk/src/fpdfeditimg.cpp @@ -11,10 +11,11 @@ DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_NewImgeObj(FPDF_DOCUMENT document) { - if (!document) - return NULL; + CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); + if (!pDoc) + return nullptr; CPDF_ImageObject* pImageObj = new CPDF_ImageObject; - CPDF_Image* pImg = new CPDF_Image(((CPDFXFA_Document*)document)->GetPDFDoc()); + CPDF_Image* pImg = new CPDF_Image(pDoc); pImageObj->m_pImage = pImg; return pImageObj; } |