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); |
} |