Index: core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp |
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp |
index a9d2c4d695cf1f264a30fc7a7ffa1bbd8cebfc46..c152b223c90cfcfbfea924aecc9730d27b4996ee 100644 |
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp |
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp |
@@ -485,7 +485,7 @@ CPDF_Pattern* CPDF_DocPageData::GetPattern(CPDF_Object* pPatternObj, FX_BOOL bSh |
if (bShading) { |
pPattern = FX_NEW CPDF_ShadingPattern(m_pPDFDoc, pPatternObj, bShading, matrix); |
} else { |
- CPDF_Dictionary* pDict = pPatternObj->GetDict(); |
+ CPDF_Dictionary* pDict = pPatternObj ? pPatternObj->GetDict() : NULL; |
if (pDict) { |
int type = pDict->GetInteger(FX_BSTRC("PatternType")); |
if (type == 1) { |