summaryrefslogtreecommitdiff
path: root/fxjs/cjs_runtime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjs_runtime.cpp')
-rw-r--r--fxjs/cjs_runtime.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/fxjs/cjs_runtime.cpp b/fxjs/cjs_runtime.cpp
index 662269514a..6da52ad7ef 100644
--- a/fxjs/cjs_runtime.cpp
+++ b/fxjs/cjs_runtime.cpp
@@ -195,11 +195,7 @@ void CJS_Runtime::SetFormFillEnvToDocument() {
if (!pJSDocument)
return;
- Document* pDocument = static_cast<Document*>(pJSDocument->GetEmbedObject());
- if (!pDocument)
- return;
-
- pDocument->SetFormFillEnv(m_pFormFillEnv.Get());
+ pJSDocument->SetFormFillEnv(m_pFormFillEnv.Get());
}
CPDFSDK_FormFillEnvironment* CJS_Runtime::GetFormFillEnv() const {