summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/doctemplates.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/doctemplates.cxx')
-rw-r--r--sfx2/source/doc/doctemplates.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 82826eb4c711..b5926871954e 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -674,11 +674,14 @@ void SfxDocTplService::getTitleFromURL( const OUString& rURL, OUString& aTitle,
if ( !aDocType.isEmpty() )
try
{
- uno::Reference< container::XNameAccess > xTypeDetection( mxType, uno::UNO_QUERY_THROW );
- SequenceAsHashMap aTypeProps( xTypeDetection->getByName( aDocType ) );
- aType = aTypeProps.getUnpackedValueOrDefault(
- u"MediaType"_ustr,
- OUString() );
+ uno::Reference< container::XNameAccess > xTypeDetection( mxType, uno::UNO_QUERY );
+ if (xTypeDetection)
+ {
+ SequenceAsHashMap aTypeProps( xTypeDetection->getByName( aDocType ) );
+ aType = aTypeProps.getUnpackedValueOrDefault(
+ u"MediaType"_ustr,
+ OUString() );
+ }
}
catch( uno::Exception& )
{}