summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 106d997e44..a44172e191 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -538,7 +538,8 @@ void CPDFXFA_DocEnvironment::SetFocusWidget(CXFA_FFDoc* hDoc,
return;
if (!hWidget) {
- m_pDocument->GetSDKDoc()->SetFocusAnnot(nullptr);
+ CPDFSDK_Annot::ObservedPtr pNull;
+ m_pDocument->GetSDKDoc()->SetFocusAnnot(&pNull);
return;
}
@@ -548,9 +549,9 @@ void CPDFXFA_DocEnvironment::SetFocusWidget(CXFA_FFDoc* hDoc,
if (!pPageView)
continue;
- CPDFSDK_Annot* pAnnot = pPageView->GetAnnotByXFAWidget(hWidget);
+ CPDFSDK_Annot::ObservedPtr pAnnot(pPageView->GetAnnotByXFAWidget(hWidget));
if (pAnnot) {
- m_pDocument->GetSDKDoc()->SetFocusAnnot(pAnnot);
+ m_pDocument->GetSDKDoc()->SetFocusAnnot(&pAnnot);
break;
}
}