Index: fpdfsdk/javascript/Field.cpp |
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp |
index 51724c450f917e5163c56f2578868e55f94e7548..652f1e640d646209aa77c4e5c26798d0625371c6 100644 |
--- a/fpdfsdk/javascript/Field.cpp |
+++ b/fpdfsdk/javascript/Field.cpp |
@@ -212,7 +212,7 @@ void Field::ParseFieldName(const std::wstring& strFieldNameParsed, |
FX_BOOL Field::AttachField(Document* pDocument, |
const CFX_WideString& csFieldName) { |
m_pJSDoc = pDocument; |
- m_pFormFillEnv.Reset(pDocument->GetReaderDoc()->GetEnv()); |
+ m_pFormFillEnv.Reset(pDocument->GetFormFillEnv()); |
m_bCanSet = |
m_pFormFillEnv->GetSDKDocument()->GetPermissions(FPDFPERM_FILL_FORM) || |
m_pFormFillEnv->GetSDKDocument()->GetPermissions(FPDFPERM_ANNOT_FORM) || |