diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-01-30 07:52:44 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-02-04 22:04:21 +0100 |
commit | a2d4d00cb34cb092ad3d226d086976991c0991cb (patch) | |
tree | 7820e05eeafda8b1614322c83214af60eea46273 /sw | |
parent | dc015ccb07c01a32666b87d2535c9265581b0aeb (diff) |
Check emptiness of last token on index
Change-Id: I4cf0ea849f221270ebe8763d6a55f20dd72ba576
Reviewed-on: https://gerrit.libreoffice.org/67316
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/fldui/fldref.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 4ece72e1a1a4..f52464c6e142 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -285,10 +285,9 @@ void SwFieldRefPage::Reset(const SfxItemSet* ) break; } } - sVal = sUserData.getToken(0, ';', nIdx); - if(!sVal.isEmpty()) + if (nIdx>=0 && nIdx<sUserData.getLength()) { - nFormatBoxPosition = static_cast< sal_uInt16 >(sVal.toInt32()); + nFormatBoxPosition = static_cast< sal_uInt16 >(sUserData.getToken(0, ';', nIdx).toInt32()); } } } |