[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - sc/source
Thorsten Behrens (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 10 07:30:07 UTC 2020
sc/source/core/data/table3.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit ad61d80dde0424e1ed5c5b4c6bd7d50487567d75
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
AuthorDate: Thu Sep 10 00:18:08 2020 +0200
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Sep 10 09:29:34 2020 +0200
Check range before accessing Calc sort userlist
Change-Id: I74df0bc6db978e06e8014ac1bc0d76a66c7f4fe8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102341
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 776ca2e3c51a..b4f1af735925 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -1520,9 +1520,9 @@ short ScTable::CompareCell(
bool bNaturalSort = aSortParam.bNaturalSort; // natural sort
bool bCaseSens = aSortParam.bCaseSens; // case sensitivity
- if (bUserDef)
+ ScUserList* pList = ScGlobal::GetUserList();
+ if (bUserDef && pList && pList->size() > aSortParam.nUserIndex)
{
- ScUserList* pList = ScGlobal::GetUserList();
const ScUserListData& rData = (*pList)[aSortParam.nUserIndex];
if ( bNaturalSort )
More information about the Libreoffice-commits
mailing list