Index: fpdfsdk/src/javascript/app.cpp |
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/src/javascript/app.cpp |
index f8b2e3550e062678c416b9859f89876bd5ac0d10..09b14440fb79842e2f32112b1e4f85d0ad705519 100644 |
--- a/fpdfsdk/src/javascript/app.cpp |
+++ b/fpdfsdk/src/javascript/app.cpp |
@@ -200,7 +200,7 @@ FX_BOOL app::viewerVersion(IJS_Context* cc, |
CJS_Context* pContext = (CJS_Context*)cc; |
CPDFSDK_Document* pCurDoc = pContext->GetReaderDocument(); |
- CPDFXFA_Document* pDoc = pCurDoc->GetDocument(); |
+ CPDFXFA_Document* pDoc = pCurDoc->GetXFADocument(); |
if (pDoc->GetDocType() == 1 || pDoc->GetDocType() == 2) { |
vp << JS_NUM_VIEWERVERSION_XFA; |
return TRUE; |