diff options
author | Kai Sommerfeld <kso@openoffice.org> | 2001-02-15 12:32:27 +0000 |
---|---|---|
committer | Kai Sommerfeld <kso@openoffice.org> | 2001-02-15 12:32:27 +0000 |
commit | af4d7974c0620459cc735b1d25e6dd78dc11d466 (patch) | |
tree | 5f3484109435a8bcc2a288eeeabcfefff8175bf7 /ucbhelper | |
parent | 0e09807a9a8eb843fb2074a6cd640347c004367a (diff) |
#83984# - Survive empty environment!
Diffstat (limited to 'ucbhelper')
-rw-r--r-- | ucbhelper/source/provider/commandenvironmentproxy.cxx | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/ucbhelper/source/provider/commandenvironmentproxy.cxx b/ucbhelper/source/provider/commandenvironmentproxy.cxx index 9efc261240c1..aaa02299ec26 100644 --- a/ucbhelper/source/provider/commandenvironmentproxy.cxx +++ b/ucbhelper/source/provider/commandenvironmentproxy.cxx @@ -2,9 +2,9 @@ * * $RCSfile: commandenvironmentproxy.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: kso $ $Date: 2001-02-12 11:51:28 $ + * last change: $Author: kso $ $Date: 2001-02-15 13:32:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -173,17 +173,19 @@ Reference< XInteractionHandler > SAL_CALL CommandEnvironmentProxy::getInteractionHandler() throw ( RuntimeException ) { - if ( !m_pImpl->m_bGotInteractionHandler ) + if ( m_pImpl->m_xEnv.is() ) { - osl::MutexGuard aGuard( m_pImpl->m_aMutex ); if ( !m_pImpl->m_bGotInteractionHandler ) { - m_pImpl->m_xInteractionHandler - = m_pImpl->m_xEnv->getInteractionHandler(); - m_pImpl->m_bGotInteractionHandler = sal_True; + osl::MutexGuard aGuard( m_pImpl->m_aMutex ); + if ( !m_pImpl->m_bGotInteractionHandler ) + { + m_pImpl->m_xInteractionHandler + = m_pImpl->m_xEnv->getInteractionHandler(); + m_pImpl->m_bGotInteractionHandler = sal_True; + } } } - return m_pImpl->m_xInteractionHandler; } @@ -193,17 +195,19 @@ Reference< XProgressHandler > SAL_CALL CommandEnvironmentProxy::getProgressHandler() throw ( RuntimeException ) { - if ( !m_pImpl->m_bGotProgressHandler ) + if ( m_pImpl->m_xEnv.is() ) { - osl::MutexGuard aGuard( m_pImpl->m_aMutex ); if ( !m_pImpl->m_bGotProgressHandler ) { - m_pImpl->m_xProgressHandler - = m_pImpl->m_xEnv->getProgressHandler(); - m_pImpl->m_bGotProgressHandler = sal_True; + osl::MutexGuard aGuard( m_pImpl->m_aMutex ); + if ( !m_pImpl->m_bGotProgressHandler ) + { + m_pImpl->m_xProgressHandler + = m_pImpl->m_xEnv->getProgressHandler(); + m_pImpl->m_bGotProgressHandler = sal_True; + } } } - return m_pImpl->m_xProgressHandler; } |