From 55ed2880e9d19e79717063b117aa5eee40dd454b Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Wed, 28 Oct 2015 11:49:02 -0700 Subject: Add a NULL check in pdf_page_colors.cpp R=thestig@chromium.org BUG=548714 Review URL: https://codereview.chromium.org/1430653002 . --- core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/src') diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp index bed3cfbb2c..e4bb1a3d10 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp @@ -327,6 +327,9 @@ class CPDF_CalGray : public CPDF_ColorSpace { FX_BOOL CPDF_CalGray::v_Load(CPDF_Document* pDoc, CPDF_Array* pArray) { CPDF_Dictionary* pDict = pArray->GetDict(1); + if (!pDict) + return FALSE; + CPDF_Array* pParam = pDict->GetArray(FX_BSTRC("WhitePoint")); int i; for (i = 0; i < 3; i++) { -- cgit v1.2.3