From d43d756500114738ac845c6e24cba8c897ed659d Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 3 Dec 2012 15:07:18 +0200 Subject: WaE: BaseReference::_pInterface may be used uninitialized in this function Change-Id: I061dc4ee8c8fb5b369e3ed78f0fba136ef8b02d0 --- sfx2/source/doc/doctemplates.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sfx2') diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index a724dea9f236..1313fee8aa03 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -1857,7 +1857,9 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, throw uno::RuntimeException(); // find the mediatype and extension - uno::Reference< container::XNameAccess > xTypeDetection = + uno::Reference< container::XNameAccess > xTypeDetection; + + xTypeDetection = mxType.is() ? uno::Reference< container::XNameAccess >( mxType, uno::UNO_QUERY_THROW ) : uno::Reference< container::XNameAccess >( -- cgit