[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Oct 27 14:23:32 UTC 2019
sw/source/ui/fldui/fldref.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit afe77b8a4461acff3c4a9c3fb2d1a5d0d027b858
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 25 20:33:26 2019 +0100
Commit: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Sun Oct 27 15:22:48 2019 +0100
ensure id is valid before use
Change-Id: Id0b5d07bbe3d2095858f9c3773d1acab3eac9636
Reviewed-on: https://gerrit.libreoffice.org/81535
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index d034a61337da..6b00cacbc935 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -373,7 +373,7 @@ IMPL_LINK_NOARG(SwFieldRefPage, TypeHdl, weld::TreeView&, void)
switch (nTypeId)
{
case TYP_GETREFFLD:
- if (REFFLDFLAG & m_xTypeLB->get_id(nOld).toUInt32())
+ if (nOld != -1 && REFFLDFLAG & m_xTypeLB->get_id(nOld).toUInt32())
// the old one stays
nFieldDlgFormatSel = m_xFormatLB->get_selected_index();
bName = true;
More information about the Libreoffice-commits
mailing list