From 6e369c2ebb4769a42736b32154c0de12b73df45d Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 31 Aug 2015 14:44:21 -0700 Subject: Fix two issues shown by bug 489995 - Handle NULL in buffer operator<< under JS mailForm() calls. - Ensure correct type in JS addIcon() calls. BUG=489995 R=brucedawson@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/1327473002 . --- core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp index 9e1434139c..63454d2cb5 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp @@ -410,7 +410,7 @@ CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& buf, const CPDF_Object* pObj) { CFX_ByteString key; CPDF_Object* pValue = p->GetNextElement(pos, key); buf << FX_BSTRC("/") << PDF_NameEncode(key); - if (pValue->GetObjNum()) { + if (pValue && pValue->GetObjNum()) { buf << " " << pValue->GetObjNum() << FX_BSTRC(" 0 R "); } else { buf << pValue; -- cgit v1.2.3