Index: core/fpdfdoc/doc_form.cpp |
diff --git a/core/fpdfdoc/doc_form.cpp b/core/fpdfdoc/doc_form.cpp |
index 7ecf35de37155ec8763499b0a4bf035428f13206..25a9f0b72d32112d0e775868379d3b9a6d075650 100644 |
--- a/core/fpdfdoc/doc_form.cpp |
+++ b/core/fpdfdoc/doc_form.cpp |
@@ -620,8 +620,7 @@ FX_BOOL CPDF_InterForm::ValidateFieldName(CFX_WideString& csNewFieldName, |
FX_BOOL CPDF_InterForm::ValidateFieldName(const CPDF_FormField* pField, |
CFX_WideString& csNewFieldName) { |
return pField && !csNewFieldName.IsEmpty() && |
- ValidateFieldName(csNewFieldName, |
- ((CPDF_FormField*)pField)->GetFieldType(), pField, |
+ ValidateFieldName(csNewFieldName, pField->GetFieldType(), pField, |
nullptr); |
} |
FX_BOOL CPDF_InterForm::ValidateFieldName(const CPDF_FormControl* pControl, |
@@ -629,7 +628,7 @@ FX_BOOL CPDF_InterForm::ValidateFieldName(const CPDF_FormControl* pControl, |
if (!pControl || csNewFieldName.IsEmpty()) { |
return FALSE; |
} |
- CPDF_FormField* pField = ((CPDF_FormControl*)pControl)->GetField(); |
+ CPDF_FormField* pField = pControl->GetField(); |
return ValidateFieldName(csNewFieldName, pField->GetFieldType(), pField, |
pControl); |
} |