diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-09-10 00:18:08 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-09-12 11:24:44 +0200 |
commit | f2b264077ea7e5e944de16580a30c2eecfadf50d (patch) | |
tree | d00372ff465bf7d4d5e4ec1b17eda34eb68552fe | |
parent | c258db7bea59bd536d71fd91c960d3bd9e1b4bb4 (diff) |
Check range before accessing Calc sort userlist
Change-Id: I74df0bc6db978e06e8014ac1bc0d76a66c7f4fe8
-rw-r--r-- | sc/source/core/data/table3.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 07c4030382c2..487e7eec6626 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 ) |