diff options
Diffstat (limited to 'bridges/source/remote/urp/urp_environment.cxx')
-rw-r--r-- | bridges/source/remote/urp/urp_environment.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bridges/source/remote/urp/urp_environment.cxx b/bridges/source/remote/urp/urp_environment.cxx index fd0c56ba4376..1afab0633fd4 100644 --- a/bridges/source/remote/urp/urp_environment.cxx +++ b/bridges/source/remote/urp/urp_environment.cxx @@ -342,10 +342,13 @@ static void SAL_CALL RemoteEnvironment_thisDispose( uno_Environment *pEnvRemote pImpl->m_pReader = 0; } - ::osl::MutexGuard guard2( ::osl::Mutex::getGlobalMutex() ); - if( ! g_bStaticDestructorsCalled ) + bool bReleaseStubs = false; + { + ::osl::MutexGuard guard2( ::osl::Mutex::getGlobalMutex() ); + bReleaseStubs = !g_bStaticDestructorsCalled; + } + if( bReleaseStubs ) { - // delete the stubs releaseStubs( pEnvRemote ); } } |