summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_form.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfdoc/doc_form.cpp')
-rw-r--r--core/src/fpdfdoc/doc_form.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp
index 8078608883..3192445d90 100644
--- a/core/src/fpdfdoc/doc_form.cpp
+++ b/core/src/fpdfdoc/doc_form.cpp
@@ -1086,13 +1086,12 @@ CPDF_FormField* CPDF_InterForm::AddTerminalField(CPDF_Dictionary* pFieldDict) {
}
pField = new CPDF_FormField(this, pParent);
CPDF_Object* pTObj = pDict->GetElement("T");
- if (pTObj && pTObj->GetType() == PDFOBJ_REFERENCE) {
+ if (ToReference(pTObj)) {
CPDF_Object* pClone = pTObj->Clone(TRUE);
- if (pClone) {
+ if (pClone)
pDict->SetAt("T", pClone);
- } else {
+ else
pDict->SetAtName("T", "");
- }
}
m_pFieldTree->SetField(csWName, pField);
}