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

Unified Diff: core/src/fpdfdoc/doc_ap.cpp

Issue 1418493006: Merge to XFA: Cleanup CPDF_Stream: (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: fix build Created 5 years, 1 month 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 | « core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp ('k') | fpdfsdk/src/fpdfsave.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/doc_ap.cpp
diff --git a/core/src/fpdfdoc/doc_ap.cpp b/core/src/fpdfdoc/doc_ap.cpp
index d6c25f31e30f982b2c2fc991c183da8837800024..7fc9407c7326422c95096d9e1a4a0e16cdf40a44 100644
--- a/core/src/fpdfdoc/doc_ap.cpp
+++ b/core/src/fpdfdoc/doc_ap.cpp
@@ -427,11 +427,8 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
pAnnotDict->SetAt("AP", pAPDict);
}
CPDF_Stream* pNormalStream = pAPDict->GetStream("N");
- if (pNormalStream == NULL) {
- pNormalStream = CPDF_Stream::Create(NULL, 0, NULL);
- if (pNormalStream == NULL) {
- return FALSE;
- }
+ if (!pNormalStream) {
+ pNormalStream = new CPDF_Stream(nullptr, 0, nullptr);
int32_t objnum = pDoc->AddIndirectObject(pNormalStream);
pAnnotDict->GetDict("AP")->SetAtReference("N", pDoc, objnum);
}
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp ('k') | fpdfsdk/src/fpdfsave.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698