Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2491)

Unified Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp

Issue 1327473002: Fix two issues shown by bug 489995 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add test for addIcon() Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | fpdfsdk/src/javascript/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
index 9e1434139c99cfe4a59f8e2d9a89798ee3d4e4f4..63454d2cb5013d0681fb49a1bc157f24114276b9 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;
« no previous file with comments | « no previous file | fpdfsdk/src/javascript/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698