diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-03-01 17:39:40 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-03-01 19:37:19 +0000 |
commit | 1ec54b38f1fad81d8e456c6c7d2e4a1d665f25b9 (patch) | |
tree | d3977de7dbc140a158d8d47641fb437be976b5db /package | |
parent | f6633ad610173d6e22a29124d1903f9e5032ea29 (diff) |
assert that Mutex exists at ctor time
and drop the never can be hit throw
Change-Id: I74c92f1ff50ef0f3f6f78a53057f121a3665ec3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148072
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'package')
-rw-r--r-- | package/source/xstor/owriteablestream.cxx | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index d41e363137d0..97b78249f6d8 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -1237,6 +1237,7 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStre } rtl::Reference<OWriteStream> tmp; + assert(m_xMutex.is() && "No mutex!"); if ( !xStream.is() ) tmp = new OWriteStream( *this, bHierarchyAccess ); else @@ -1535,10 +1536,6 @@ OWriteStream::OWriteStream( OWriteStream_Impl& rImpl, bool bTransacted ) , m_nInitPosition( 0 ) , m_bTransacted( bTransacted ) { - OSL_ENSURE( m_pImpl->m_xMutex.is(), "No mutex!" ); - - if ( !m_pImpl->m_xMutex.is() ) - throw uno::RuntimeException(); // just a disaster } OWriteStream::OWriteStream( OWriteStream_Impl& rImpl, uno::Reference< io::XStream > const & xStream, bool bTransacted ) @@ -1551,11 +1548,6 @@ OWriteStream::OWriteStream( OWriteStream_Impl& rImpl, uno::Reference< io::XStrea , m_nInitPosition( 0 ) , m_bTransacted( bTransacted ) { - OSL_ENSURE( m_pImpl->m_xMutex.is(), "No mutex!" ); - - if ( !m_pImpl->m_xMutex.is() ) - throw uno::RuntimeException(); // just a disaster - if ( xStream.is() ) { m_xInStream = xStream->getInputStream(); |