summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript')
-rw-r--r--fpdfsdk/javascript/Field.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp
index 3abf0ecc7e..0534f47749 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -3222,7 +3222,8 @@ FX_BOOL Field::setFocus(IJS_Context* cc,
}
if (pWidget) {
- m_pDocument->SetFocusAnnot(pWidget);
+ CPDFSDK_Annot::ObservedPtr pObserved(pWidget);
+ m_pDocument->SetFocusAnnot(&pObserved);
}
return TRUE;