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>
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index b352eac..60934b5 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;
                    }
                }
            }
        }