summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_listbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/formfiller/cffl_listbox.cpp')
-rw-r--r--fpdfsdk/formfiller/cffl_listbox.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/fpdfsdk/formfiller/cffl_listbox.cpp b/fpdfsdk/formfiller/cffl_listbox.cpp
index 9dad11d3a0..e628e59cb8 100644
--- a/fpdfsdk/formfiller/cffl_listbox.cpp
+++ b/fpdfsdk/formfiller/cffl_listbox.cpp
@@ -117,9 +117,18 @@ void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView) {
} else {
m_pWidget->SetOptionSelection(pListBox->GetCurSel(), true, false);
}
+ CPDFSDK_Widget::ObservedPtr observed_widget(m_pWidget.Get());
+ CFFL_ListBox::ObservedPtr observed_this(this);
+
m_pWidget->SetTopVisibleIndex(nNewTopIndex);
+ if (!observed_widget)
+ return;
m_pWidget->ResetFieldAppearance(true);
+ if (!observed_widget)
+ return;
m_pWidget->UpdateField();
+ if (!observed_widget || !observed_this)
+ return;
SetChangeMark();
}