| Index: fpdfsdk/src/fsdk_mgr.cpp
|
| diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
|
| index 933f45153875b73e4ea75b4c4fdbe667027a2bdc..5b9ee00cb5fd0a2db835b703962aa776f8397414 100644
|
| --- a/fpdfsdk/src/fsdk_mgr.cpp
|
| +++ b/fpdfsdk/src/fsdk_mgr.cpp
|
| @@ -854,6 +854,13 @@ FX_BOOL CPDFSDK_PageView::DeleteAnnot(CPDFSDK_Annot* pAnnot) {
|
| pPage->GetDocument()->GetDocType() != DOCTYPE_DYNAMIC_XFA))
|
| return FALSE;
|
|
|
| + if (GetFocusAnnot() == pAnnot)
|
| + KillFocusAnnot();
|
| + CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
|
| + CPDFSDK_AnnotHandlerMgr* pAnnotHandler = pEnv->GetAnnotHandlerMgr();
|
| + if (pAnnotHandler)
|
| + pAnnotHandler->ReleaseAnnot(pAnnot);
|
| +
|
| auto it = std::find(m_fxAnnotArray.begin(), m_fxAnnotArray.end(), pAnnot);
|
| if (it != m_fxAnnotArray.end())
|
| m_fxAnnotArray.erase(it);
|
|
|