summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_widgethandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/cpdfsdk_widgethandler.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_widgethandler.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/fpdfsdk/cpdfsdk_widgethandler.cpp b/fpdfsdk/cpdfsdk_widgethandler.cpp
index cab210db42..1e63f5ecc6 100644
--- a/fpdfsdk/cpdfsdk_widgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_widgethandler.cpp
@@ -46,8 +46,7 @@ bool CPDFSDK_WidgetHandler::CanAnswer(CPDFSDK_Annot* pAnnot) {
return true;
CPDF_Page* pPage = pWidget->GetPDFPage();
- CPDF_Document* pDocument = pPage->m_pDocument;
- uint32_t dwPermissions = pDocument->GetUserPermissions();
+ uint32_t dwPermissions = pPage->m_pDocument->GetUserPermissions();
return (dwPermissions & FPDFPERM_FILL_FORM) ||
(dwPermissions & FPDFPERM_ANNOT_FORM);
}