diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-12-05 15:31:46 +0000 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2019-12-06 11:33:41 +0100 |
commit | 496716a8709aa53eb8705938821e6cf25f6b5edf (patch) | |
tree | 05049b2cfd6541e49c501142db6e2a79cf77c62b /sw | |
parent | 1ca9c335a564babbfd19801129c1e010666cdf60 (diff) |
tdf#127955 check if position stored in user config is in range for the treeview
https://crashreport.libreoffice.org/stats/crash_details/8c4a3136-73be-4536-ad6f-ce97ae0368dd
Change-Id: I320f965eb622f90f8059f85e7ba2ff203419ab3f
Reviewed-on: https://gerrit.libreoffice.org/84573
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/fldui/fldref.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 6791ce55867d..45039e900446 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -257,7 +257,7 @@ void SwFieldRefPage::Reset(const SfxItemSet* ) } } TypeHdl(*m_xTypeLB); - if(nFormatBoxPosition != USHRT_MAX) + if (nFormatBoxPosition < m_xFormatLB->n_children()) { m_xFormatLB->select(nFormatBoxPosition); } |