summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_transformpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fpdf_transformpage.cpp')
-rw-r--r--fpdfsdk/src/fpdf_transformpage.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp
index 729b1cd9bb..a666666d55 100644
--- a/fpdfsdk/src/fpdf_transformpage.cpp
+++ b/fpdfsdk/src/fpdf_transformpage.cpp
@@ -96,9 +96,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, FS_MATRIX
CPDF_Page* pPage = (CPDF_Page*)page;
CPDF_Dictionary* pPageDic = pPage->m_pFormDict;
- CPDF_Object* pContentObj = pPageDic->GetElement("Contents");
+ CPDF_Object* pContentObj = pPageDic ? pPageDic->GetElement("Contents") : NULL;
if(!pContentObj)
- pContentObj = pPageDic->GetArray("Contents");
+ pContentObj = pPageDic ? pPageDic->GetArray("Contents") : NULL;
if(!pContentObj)
return FALSE;
@@ -260,9 +260,9 @@ DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page,FPDF_CLIPPATH clip
return;
CPDF_Page* pPage = (CPDF_Page*)page;
CPDF_Dictionary* pPageDic = pPage->m_pFormDict;
- CPDF_Object* pContentObj = pPageDic->GetElement("Contents");
+ CPDF_Object* pContentObj = pPageDic ? pPageDic->GetElement("Contents") : NULL;
if(!pContentObj)
- pContentObj = pPageDic->GetArray("Contents");
+ pContentObj = pPageDic ? pPageDic->GetArray("Contents") : NULL;
if(!pContentObj)
return;