summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_mgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fsdk_mgr.cpp')
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index fb5df1ea5e..63ed642367 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -485,8 +485,7 @@ FX_BOOL CPDFSDK_Document::ProcOpenAction() {
if (pOpenAction->GetType() == PDFOBJ_ARRAY)
return TRUE;
- if (pOpenAction->GetType() == PDFOBJ_DICTIONARY) {
- CPDF_Dictionary* pDict = (CPDF_Dictionary*)pOpenAction;
+ if (CPDF_Dictionary* pDict = pOpenAction->AsDictionary()) {
CPDF_Action action(pDict);
if (m_pEnv->GetActionHander())
m_pEnv->GetActionHander()->DoAction_DocOpen(action, this);