diff options
Diffstat (limited to 'fpdfsdk/formfiller/cffl_textfield.cpp')
-rw-r--r-- | fpdfsdk/formfiller/cffl_textfield.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp index 4174ae4179..ad8d27c916 100644 --- a/fpdfsdk/formfiller/cffl_textfield.cpp +++ b/fpdfsdk/formfiller/cffl_textfield.cpp @@ -141,13 +141,17 @@ void CFFL_TextField::SaveData(CPDFSDK_PageView* pPageView) { CPDFSDK_Widget::ObservedPtr observed_widget(m_pWidget.Get()); CFFL_TextField::ObservedPtr observed_this(this); + m_pWidget->SetValue(sNewValue, false); - if (observed_widget) - m_pWidget->ResetFieldAppearance(true); - if (observed_widget) - m_pWidget->UpdateField(); - if (observed_this) - SetChangeMark(); + if (!observed_widget) + return; + m_pWidget->ResetFieldAppearance(true); + if (!observed_widget) + return; + m_pWidget->UpdateField(); + if (!observed_widget || !observed_this) + return; + SetChangeMark(); } void CFFL_TextField::GetActionData(CPDFSDK_PageView* pPageView, |