diff options
Diffstat (limited to 'ucbhelper')
-rw-r--r-- | ucbhelper/source/provider/resultsethelper.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ucbhelper/source/provider/resultsethelper.cxx b/ucbhelper/source/provider/resultsethelper.cxx index f4e1154f0bce..80a9caeed97a 100644 --- a/ucbhelper/source/provider/resultsethelper.cxx +++ b/ucbhelper/source/provider/resultsethelper.cxx @@ -185,11 +185,15 @@ sal_Int16 SAL_CALL ResultSetImplHelper::getCapabilities() void SAL_CALL ResultSetImplHelper::connectToCache( const uno::Reference< css::ucb::XDynamicResultSet > & xCache ) { - if ( m_xListener.is() ) - throw css::ucb::ListenerAlreadySetException(); + { + std::unique_lock aGuard( m_aMutex ); - if ( m_bStatic ) - throw css::ucb::ListenerAlreadySetException(); + if ( m_xListener.is() ) + throw css::ucb::ListenerAlreadySetException(); + + if ( m_bStatic ) + throw css::ucb::ListenerAlreadySetException(); + } uno::Reference< css::ucb::XSourceInitialization > xTarget( xCache, uno::UNO_QUERY ); if ( xTarget.is() ) |