summaryrefslogtreecommitdiff
path: root/fpdfsdk/src
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-11 13:54:33 -0700
committerLei Zhang <thestig@chromium.org>2015-08-11 13:54:33 -0700
commit1e2ece0cf98f8daecdea5b45ebd20cedbcef4bd9 (patch)
tree44f4cc23078cc1e324db1ed3892f1f5f26c2dc35 /fpdfsdk/src
parent3a3849176aa6e2db8baf2f9367b2d96c71815319 (diff)
downloadpdfium-1e2ece0cf98f8daecdea5b45ebd20cedbcef4bd9.tar.xz
Remove dead code from CPDF_Metadata. Add missing nullptr check.
BUG=pdfium:117 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1282653002 .
Diffstat (limited to 'fpdfsdk/src')
-rw-r--r--fpdfsdk/src/fpdf_ext.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp
index e95a2f0094..2d84ff2a50 100644
--- a/fpdfsdk/src/fpdf_ext.cpp
+++ b/fpdfsdk/src/fpdf_ext.cpp
@@ -88,7 +88,7 @@ void CheckUnSupportAnnot(CPDF_Document* pDoc, CPDF_Annot* pPDFAnnot) {
}
}
-FX_BOOL CheckSharedForm(CXML_Element* pElement, CFX_ByteString cbName) {
+FX_BOOL CheckSharedForm(const CXML_Element* pElement, CFX_ByteString cbName) {
int count = pElement->CountAttrs();
int i = 0;
for (i = 0; i < count; i++) {
@@ -169,9 +169,8 @@ void CheckUnSupportError(CPDF_Document* pDoc, FX_DWORD err_code) {
}
// SharedForm
- CPDF_Metadata metaData;
- metaData.LoadDoc(pDoc);
- CXML_Element* pElement = metaData.GetRoot();
+ CPDF_Metadata metaData(pDoc);
+ const CXML_Element* pElement = metaData.GetRoot();
if (pElement)
CheckSharedForm(pElement, "workflowType");