summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/xml/XMLExportDatabaseRanges.cxx4
-rw-r--r--sc/source/filter/xml/xmldrani.cxx4
2 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index a1929380a6ad..a22d16f42d3a 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -612,6 +612,10 @@ void ScXMLExportDatabaseRanges::WriteDatabaseRanges(const com::sun::star::uno::R
pDBCollection->SearchName(sDatabaseRangeName, nIndex);
pDBData = (*pDBCollection)[nIndex];
}
+
+ if (!pDBData)
+ continue;
+
if (pDBData->HasImportSelection())
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_IS_SELECTION, XML_TRUE);
if (pDBData->HasAutoFilter())
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index 581348904b99..dd1dc6569458 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -370,6 +370,10 @@ void ScXMLDatabaseRangeContext::EndElement()
pDBCollection->SearchName(sDatabaseRangeName, nIndex);
pDBData = (*pDBCollection)[nIndex];
}
+
+ if (!pDBData)
+ return;
+
pDBData->SetImportSelection(bIsSelection);
pDBData->SetAutoFilter(bAutoFilter);
if (bAutoFilter)