summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-06-23 16:39:39 +0200
committerLuboš Luňák <l.lunak@collabora.com>2022-06-24 08:38:32 +0200
commit9e170a35eebbe86e6137510bc8ea34e5a45dbd8d (patch)
tree7fe8d696dff146ce6a85f49a37ea64eee77325e8 /sc/source/core
parent2df577b1a89d153da78b6c333e741082cf969086 (diff)
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.lunak@collabora.com>
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/queryevaluator.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/data/queryevaluator.cxx b/sc/source/core/data/queryevaluator.cxx
index 4e35eeffcd62..d0b30a9942fd 100644
--- a/sc/source/core/data/queryevaluator.cxx
+++ b/sc/source/core/data/queryevaluator.cxx
@@ -491,8 +491,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)