ofz#68019 Null-dereference READ

Change-Id: Ie0c9c5a74e6ae87a0bd4c35320a687458d1d9902
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166074
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
diff --git a/sc/source/filter/oox/PivotTableFormat.cxx b/sc/source/filter/oox/PivotTableFormat.cxx
index 2fc0cfa..870a6c9 100644
--- a/sc/source/filter/oox/PivotTableFormat.cxx
+++ b/sc/source/filter/oox/PivotTableFormat.cxx
@@ -105,7 +105,7 @@ void PivotTableFormat::finalizeImport()
    aFormat.pPattern = pPattern;
    for (auto& rReference : maReferences)
    {
        if (rReference->mnField)
        if (rReference->mnField && !rReference->maFieldItemsIndices.empty())
        {
            aFormat.aSelections.push_back(
                sc::Selection{ .bSelected = rReference->mbSelected,