diff options
Diffstat (limited to 'fpdfsdk/pwl/cpwl_edit.cpp')
-rw-r--r-- | fpdfsdk/pwl/cpwl_edit.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fpdfsdk/pwl/cpwl_edit.cpp b/fpdfsdk/pwl/cpwl_edit.cpp index 0b74a1896e..662c69e369 100644 --- a/fpdfsdk/pwl/cpwl_edit.cpp +++ b/fpdfsdk/pwl/cpwl_edit.cpp @@ -481,11 +481,17 @@ bool CPWL_Edit::OnKeyDown(uint16_t nChar, uint32_t nFlag) { if (nSelStart == nSelEnd) nSelEnd = nSelStart + 1; + CPWL_Wnd::ObservedPtr thisObserved(this); + bool bRC; bool bExit; std::tie(bRC, bExit) = m_pFillerNotify->OnBeforeKeyStroke( GetAttachedData(), strChange, strChangeEx, nSelStart, nSelEnd, true, nFlag); + + if (!thisObserved) + return false; + if (!bRC) return false; if (bExit) @@ -558,10 +564,15 @@ bool CPWL_Edit::OnChar(uint16_t nChar, uint32_t nFlag) { break; } + CPWL_Wnd::ObservedPtr thisObserved(this); + WideString strChangeEx; std::tie(bRC, bExit) = m_pFillerNotify->OnBeforeKeyStroke( GetAttachedData(), swChange, strChangeEx, nSelStart, nSelEnd, true, nFlag); + + if (!thisObserved) + return false; } } |