Check for NULL, to avoid crashes.
This commit is contained in:
parent
1075b6b48d
commit
7ba8ca9aa1
2 changed files with 8 additions and 0 deletions
|
@ -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())
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue