summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl/cpwl_edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/pwl/cpwl_edit.cpp')
-rw-r--r--fpdfsdk/pwl/cpwl_edit.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/fpdfsdk/pwl/cpwl_edit.cpp b/fpdfsdk/pwl/cpwl_edit.cpp
index a6f6f2ac86..4558e432ac 100644
--- a/fpdfsdk/pwl/cpwl_edit.cpp
+++ b/fpdfsdk/pwl/cpwl_edit.cpp
@@ -340,14 +340,26 @@ void CPWL_Edit::OnSetFocus() {
}
void CPWL_Edit::OnKillFocus() {
+ ObservedPtr observed_ptr = ObservedPtr(this);
CPWL_ScrollBar* pScroll = GetVScrollBar();
if (pScroll && pScroll->IsVisible()) {
pScroll->SetVisible(false);
+ if (!observed_ptr)
+ return;
+
Move(m_rcOldWindow, true, true);
}
+ if (!observed_ptr)
+ return;
m_pEdit->SelectNone();
+ if (!observed_ptr)
+ return;
+
SetCaret(false, CFX_PointF(), CFX_PointF());
+ if (!observed_ptr)
+ return;
+
SetCharSet(FX_CHARSET_ANSI);
m_bFocus = false;
}