summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-10 15:27:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-10 18:13:43 +0200
commit57a1d8d2c3ce8741c0bfbaa66160f6091a1c7f68 (patch)
treea09de8d701e3e487d6a29455c4ec7a06a89cacdc
parente6a8d312d3d7e5d81c56d5ccc0508116dd283f1f (diff)
crash in tdf132431-1.ods --export-to xls
probably related to commit 817ef891cf2bef8fdc82852f73acb422afb89bd2 tdf#142579 Consider color scale background colors in color filter Change-Id: I30bc477319ffc5474d9a27c4955603a183cccf12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/source/core/data/column3.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index b352eace6c90..60934b5ba8a0 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2479,8 +2479,12 @@ class FilterEntriesHandler
{
const ScColorScaleFormat* pColFormat
= static_cast<const ScColorScaleFormat*>(aEntry);
- backgroundColor = *(pColFormat->GetColor(aPos));
- bHasConditionalBackgroundColor = true;
+ std::optional<Color> oColor = pColFormat->GetColor(aPos);
+ if (oColor)
+ {
+ backgroundColor = *oColor;
+ bHasConditionalBackgroundColor = true;
+ }
}
}
}