diff options
Diffstat (limited to 'fpdfsdk/formfiller/cffl_textfield.cpp')
-rw-r--r-- | fpdfsdk/formfiller/cffl_textfield.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp index 76434a5216..4174ae4179 100644 --- a/fpdfsdk/formfiller/cffl_textfield.cpp +++ b/fpdfsdk/formfiller/cffl_textfield.cpp @@ -139,10 +139,15 @@ void CFFL_TextField::SaveData(CPDFSDK_PageView* pPageView) { WideString sOldValue = m_pWidget->GetValue(); WideString sNewValue = pWnd->GetText(); + CPDFSDK_Widget::ObservedPtr observed_widget(m_pWidget.Get()); + CFFL_TextField::ObservedPtr observed_this(this); m_pWidget->SetValue(sNewValue, false); - m_pWidget->ResetFieldAppearance(true); - m_pWidget->UpdateField(); - SetChangeMark(); + if (observed_widget) + m_pWidget->ResetFieldAppearance(true); + if (observed_widget) + m_pWidget->UpdateField(); + if (observed_this) + SetChangeMark(); } void CFFL_TextField::GetActionData(CPDFSDK_PageView* pPageView, |