diff options
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/helper/xmlsignaturehelper2.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx index ebc8a1d8f051..314079510efa 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx @@ -205,7 +205,11 @@ uno::Reference < io::XInputStream > UriBindingHelper::OpenInputStream( const uno throw uno::Exception("Could not decode URI for stream element.", nullptr); uno::Reference< io::XStream > xStream; - xStream = rxStore->cloneStreamElement( sName ); + uno::Reference<container::XNameAccess> xNameAccess(rxStore, uno::UNO_QUERY); + if (!xNameAccess->hasByName(sName)) + SAL_WARN("xmlsecurity.helper", "expected stream, but not found: " << sName); + else + xStream = rxStore->cloneStreamElement( sName ); if ( !xStream.is() ) throw uno::RuntimeException(); xInStream = xStream->getInputStream(); |