sc/source/core/data/queryevaluator.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit ec287f4f884c94ca5490d6d5139df44fc32cd03c Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Thu Jun 23 16:39:39 2022 +0200 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Fri Jun 24 11:11:59 2022 +0200 handle nullptr SharedString in ScQueryEvaluator (tdf#149679) This may be the case if the string comes from ScMatrix::Get() for ScMatValType::Empty. Change-Id: I35013449611bf7ffd1bc74e023d76597af010724 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136347 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> (cherry picked from commit ba59bd11521373f800c6b718e7e21439c1452e84) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136331 diff --git a/sc/source/core/data/queryevaluator.cxx b/sc/source/core/data/queryevaluator.cxx index 0d55c226bc62..93b2960a489f 100644 --- a/sc/source/core/data/queryevaluator.cxx +++ b/sc/source/core/data/queryevaluator.cxx @@ -489,8 +489,9 @@ std::pair<bool, bool> ScQueryEvaluator::compareByString(const ScQueryEntry& rEnt const rtl_uString* pQuer = rItem.maString.getDataIgnoreCase(); const rtl_uString* pCellStr = rSource.getDataIgnoreCase(); - assert(pQuer != nullptr); assert(pCellStr != nullptr); + if (pQuer == nullptr) + pQuer = svl::SharedString::getEmptyString().getDataIgnoreCase(); const sal_Int32 nIndex = (rEntry.eOp == SC_ENDS_WITH || rEntry.eOp == SC_DOES_NOT_END_WITH)