summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-03-13 18:12:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-18 12:31:11 +0100
commit36bc901426163aa38b551865d3dd57a3a3423910 (patch)
tree645d8304e4c85f5921e0c7cc8469df6cd91451fd /sw
parentd652495a0f5626ba02369289c0ad2cb341f9015d (diff)
tdf#140590 Writer crash in Tools>Chapter Numbering
and an assert in vcl to catch it a little higher up the stack. Change-Id: Iaa2e70f901f93ca9f678118e4f5a8bc1b6eda20a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/misc/outline.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index d9cc0113b696..9b65b575fbc4 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -92,7 +92,7 @@ void SwNumNamesDlg::SetUserNames(const OUString *pList[])
nSelect++;
}
}
- m_xFormBox->select(nSelect);
+ m_xFormBox->select(std::min(nSelect, static_cast<sal_uInt16>(m_xFormBox->n_children() - 1)));
SelectHdl(*m_xFormBox);
}