diff options
Diffstat (limited to 'stoc/source/javaloader')
-rw-r--r-- | stoc/source/javaloader/javaloader.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx index 3a454f16b5cb..7b80dbd492e7 100644 --- a/stoc/source/javaloader/javaloader.cxx +++ b/stoc/source/javaloader/javaloader.cxx @@ -372,15 +372,15 @@ css::uno::Reference<XInterface> SAL_CALL JavaComponentLoader_CreateInstance(cons MutexGuard guard( getInitMutex() ); // The javaloader is never destroyed and there can be only one! // Note that the first context wins .... - static css::uno::Reference< XInterface > *pStaticRef = 0; - if( pStaticRef ) + static css::uno::Reference< XInterface > xStaticRef; + if( xStaticRef.is() ) { - xRet = *pStaticRef; + xRet = xStaticRef; } else { xRet = *new JavaComponentLoader(xCtx); - pStaticRef = new css::uno::Reference< XInterface > ( xRet ); + xStaticRef = xRet; } } catch(const RuntimeException & runtimeException) { |