diff options
Diffstat (limited to 'stoc/test/testsmgr_cpnt.cxx')
-rw-r--r-- | stoc/test/testsmgr_cpnt.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/stoc/test/testsmgr_cpnt.cxx b/stoc/test/testsmgr_cpnt.cxx index 638ad81c1cce..ddb6e4ca1b29 100644 --- a/stoc/test/testsmgr_cpnt.cxx +++ b/stoc/test/testsmgr_cpnt.cxx @@ -64,13 +64,8 @@ using namespace cppu; Reference<XMultiServiceFactory> getProcessServiceManager() { - Reference<XMultiServiceFactory > s_x; - if (! s_x.is()) - { - MutexGuard aGuard( Mutex::getGlobalMutex() ); - if (! s_x.is()) - s_x = createRegistryServiceFactory( OUString("stoctest.rdb"), sal_False ); - } + static Reference<XMultiServiceFactory> s_x( + createRegistryServiceFactory(OUString("stoctest.rdb"), sal_False)); return s_x; } |