summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_docjsactions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpdf_docjsactions.cpp')
-rw-r--r--core/fpdfdoc/cpdf_docjsactions.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/fpdfdoc/cpdf_docjsactions.cpp b/core/fpdfdoc/cpdf_docjsactions.cpp
index 974ca33b8b..91db2b0484 100644
--- a/core/fpdfdoc/cpdf_docjsactions.cpp
+++ b/core/fpdfdoc/cpdf_docjsactions.cpp
@@ -22,17 +22,13 @@ CPDF_Action CPDF_DocJSActions::GetJSActionAndName(int index,
WideString* csName) const {
ASSERT(m_pDocument);
CPDF_NameTree name_tree(m_pDocument.Get(), "JavaScript");
- CPDF_Object* pAction = name_tree.LookupValueAndName(index, csName);
- return ToDictionary(pAction) ? CPDF_Action(pAction->GetDict())
- : CPDF_Action();
+ return CPDF_Action(ToDictionary(name_tree.LookupValueAndName(index, csName)));
}
CPDF_Action CPDF_DocJSActions::GetJSAction(const WideString& csName) const {
ASSERT(m_pDocument);
CPDF_NameTree name_tree(m_pDocument.Get(), "JavaScript");
- CPDF_Object* pAction = name_tree.LookupValue(csName);
- return ToDictionary(pAction) ? CPDF_Action(pAction->GetDict())
- : CPDF_Action();
+ return CPDF_Action(ToDictionary(name_tree.LookupValue(csName)));
}
int CPDF_DocJSActions::FindJSAction(const WideString& csName) const {