summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-11-20 11:53:03 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-11-20 16:29:15 +0100
commitc03a70770e667290e3766e639300c7ecef5eea1f (patch)
treedc37bdb14a5a3bae9b48b54fc48632c55c46f0fa /cui
parentf715d6156e9fd1d7e9cd0cc1f64954a47f1b5d2f (diff)
tdf#121538 index 1 never existed
Change-Id: I8493685ceab81a2bd07a3fc75b371a0f679695fb Reviewed-on: https://gerrit.libreoffice.org/63651 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/numfmt.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index a13403059b88..69b25330c98e 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1612,7 +1612,9 @@ IMPL_LINK_NOARG(SvxNumberFormatTabPage, LostFocusHdl_Impl, weld::Widget&, void)
{
sal_uInt16 nSelPos = m_xLbFormat->get_selected_index();
pNumFmtShell->SetComment4Entry(nSelPos, m_xEdComment->get_text());
- m_xEdComment->set_text(m_xLbCategory->get_text(1)); // String for user defined
+ // String for user defined, if present
+ OUString sEntry = m_xLbCategory->n_children() > 1 ? m_xLbCategory->get_text(1) : OUString();
+ m_xEdComment->set_text(sEntry);
}
}