diff options
Diffstat (limited to 'desktop/source/app/app.cxx')
-rw-r--r-- | desktop/source/app/app.cxx | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 44821e57b0b6..54405148d471 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -577,6 +577,7 @@ Desktop::Desktop() : m_bCleanedExtensionCache( false ) , m_bServicesRegistered( false ) , m_aBootstrapError( BE_OK ) +, m_pLockfile( NULL ) { RTL_LOGFILE_TRACE( "desktop (cd100003) ::Desktop::Desktop" ); } @@ -673,7 +674,11 @@ void Desktop::DeInit() ::comphelper::setProcessServiceFactory( NULL ); // clear lockfile - m_pLockfile.reset(); + if (m_pLockfile != NULL) + { + delete m_pLockfile; + m_pLockfile = NULL; + } OfficeIPCThread::DisableOfficeIPCThread(); if( pSignalHandler ) @@ -734,7 +739,12 @@ sal_Bool Desktop::QueryExit() { } - m_pLockfile.reset(); + if (m_pLockfile != NULL) + { + delete m_pLockfile; + m_pLockfile = NULL; + } + } return bExit; @@ -1300,7 +1310,11 @@ sal_uInt16 Desktop::Exception(sal_uInt16 nError) default: { - m_pLockfile.reset(); + if (m_pLockfile != NULL) + { + delete m_pLockfile; + m_pLockfile = NULL; + } if( bRestart ) { @@ -1454,7 +1468,8 @@ int Desktop::Main() // check user installation directory for lockfile so we can be sure // there is no other instance using our data files from a remote host RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main -> Lockfile" ); - m_pLockfile.reset( new Lockfile ); + delete m_pLockfile; + m_pLockfile = new Lockfile; #ifndef ANDROID if ( !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsNoLockcheck() && !m_pLockfile->check( Lockfile_execWarning )) |