diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-30 09:55:44 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-30 09:55:44 +0000 |
commit | 6bff65dfa66cfeb115c7db6cf2e4d6e5df323703 (patch) | |
tree | c1a193512361305e8d3d64318a7fbee997e50e84 /package | |
parent | OSL_ENSURE->assert when follow by deref of tested pointer (diff) | |
download | core-6bff65dfa66cfeb115c7db6cf2e4d6e5df323703.tar.gz core-6bff65dfa66cfeb115c7db6cf2e4d6e5df323703.zip |
coverity#706569 Uncaught exception
Change-Id: I7c1245eacd92b5869e6dab0389ee0ca3cebd98da
Diffstat (limited to 'package')
-rw-r--r-- | package/source/xstor/owriteablestream.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index e7a1d056e3f2..facd49406d17 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -3161,9 +3161,16 @@ uno::Any SAL_CALL OWriteStream::getPropertyValue( const OUString& aProp ) return uno::makeAny( m_pImpl->m_bUseCommonEncryption ); else if ( aPropertyName == "Size" ) { - CheckInitOnDemand(); - - if ( !m_xSeekable.is() ) + bool bThrow = false; + try + { + CheckInitOnDemand(); + } + catch (const io::IOException&) + { + bThrow = true; + } + if (bThrow || !m_xSeekable.is()) throw uno::RuntimeException(); return uno::makeAny( m_xSeekable->getLength() ); |