From 4cce875b219ea772da8d528287b0e6431dcda48e Mon Sep 17 00:00:00 2001 From: Bo Xu Date: Mon, 15 Sep 2014 11:28:25 -0700 Subject: Check Null pointer in CPDF_Dictionary::GetUnicodeText BUG=414155 R=thakis@chromium.org Review URL: https://codereview.chromium.org/574463002 --- core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp index e945ab52a0..07b447b1b6 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp @@ -626,7 +626,9 @@ CFX_WideString CPDF_Dictionary::GetUnicodeText(FX_BSTR key, CFX_CharMap* pCharMa if (p) { if(p->GetType() == PDFOBJ_REFERENCE) { p = ((CPDF_Reference*)p)->GetDirect(); - return p->GetUnicodeText(pCharMap); + if (p) { + return p->GetUnicodeText(pCharMap); + } } else { return p->GetUnicodeText(pCharMap); } -- cgit v1.2.3