summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-08-31 15:04:12 -0700
committerTom Sepez <tsepez@chromium.org>2015-08-31 15:04:12 -0700
commitaecd9d0c5cfc569269bfe6cc228efaab76a7bb1b (patch)
tree900ce5de046b972e60440327249d7c71e9f8788f /core/src/fpdfapi/fpdf_parser
parent7600f4b5054838abc9372f20ca950da6d3c57c7b (diff)
downloadpdfium-aecd9d0c5cfc569269bfe6cc228efaab76a7bb1b.tar.xz
Merge to XFA: Fix two issues shown by bug 489995
(cherry picked from commit 6e369c2ebb4769a42736b32154c0de12b73df45d) Original Review URL: https://codereview.chromium.org/1327473002 . BUG=489995 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1325743002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp2
1 files changed, 1 insertions, 1 deletions
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;