summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 2988a4902074..03b785951d5e 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2552,10 +2552,13 @@ void SdXMLExport::GetConfigurationSettings(uno::Sequence<beans::PropertyValue>&
Reference< beans::XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), UNO_QUERY );
if( xProps.is() )
SvXMLUnitConverter::convertPropertySet( rProps, xProps );
- DocumentSettingsSerializer *pFilter;
- pFilter = dynamic_cast<DocumentSettingsSerializer *>(xProps.get());
- if( pFilter )
- rProps = pFilter->filterStreamsToStorage( GetTargetStorage(), rProps );
+ DocumentSettingsSerializer *pFilter(dynamic_cast<DocumentSettingsSerializer *>(xProps.get()));
+ if (!pFilter)
+ return;
+ const uno::Reference< embed::XStorage > xStorage(GetTargetStorage());
+ if (!xStorage.is())
+ return;
+ rProps = pFilter->filterStreamsToStorage(xStorage, rProps);
}
}