summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-06-04 09:18:54 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-06-04 09:18:54 +0000
commite648c0beb777797a6d273fffc1eeaf792a6bd0b3 (patch)
tree921fd44c0b27b723973fb5ea7ee15dfc372d8acc /configmgr
parent2aa3cd63e3814d3407ba2be664d500ab365b77e0 (diff)
INTEGRATION: CWS reg006 (1.35.10); FILE MERGED
2003/05/16 09:06:02 jb 1.35.10.1: #109077# Need early check for disposed state, because the lock is gone when disposed
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/api2/apitreeimplobj.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/configmgr/source/api2/apitreeimplobj.cxx b/configmgr/source/api2/apitreeimplobj.cxx
index dc0b5c8ec3d5..c15ae361c278 100644
--- a/configmgr/source/api2/apitreeimplobj.cxx
+++ b/configmgr/source/api2/apitreeimplobj.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: apitreeimplobj.cxx,v $
*
- * $Revision: 1.35 $
+ * $Revision: 1.36 $
*
- * last change: $Author: vg $ $Date: 2003-04-15 17:16:26 $
+ * last change: $Author: vg $ $Date: 2003-06-04 10:18:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -529,6 +529,10 @@ bool ApiTreeImpl::disposeTree(bool bForce)
// ensure our provider stays alive
UnoInterfaceRef xKeepParentAlive(this->getParentComponent());
+ // #109077# If already disposed, we may have no source data or data lock
+ if (!isAlive())
+ return false;
+
data::Accessor aSourceAccessor( getSourceData() );
osl::MutexGuard aLocalGuard(getDataLock());
@@ -537,13 +541,14 @@ bool ApiTreeImpl::disposeTree(bool bForce)
if (m_pParentTree != 0)
return false;
+ // recheck after having the mutex
checkAlive(); // may throw
}
else if (m_pParentTree)
setParentTree(NULL);
implDisposeTree(aSourceAccessor); // TODO: accessor from lock
- OSL_ASSERT(!isAlive());
+ OSL_ASSERT(!isAlive()); // post condition
return true;
}