summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unotools/source/config/configitem.cxx5
-rw-r--r--unotools/source/config/configmgr.cxx5
2 files changed, 10 insertions, 0 deletions
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index 3277963e8edf..dc0fabfd298d 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -1324,7 +1324,12 @@ Reference< XHierarchicalNameAccess> ConfigItem::GetTree()
xRet = pImpl->pManager->AcquireTree(*this);
else
xRet = m_xHierarchyAccess;
+#if OSL_DEBUG_LEVEL > 1
+ // I think this is a pointless assertion, the callers seem to cope
+ // fine with returning an invalid reference, no need to crash in a
+ // dbglevel=1 build.
OSL_ENSURE(xRet.is(), "AcquireTree failed");
+#endif
return xRet;
}
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 87c7b6259d63..16606c346985 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -116,7 +116,12 @@ ConfigManager::ConfigManager(Reference< XMultiServiceFactory > xConfigProv) :
ConfigManager::~ConfigManager()
{
//check list content -> should be empty!
+#if OSL_DEBUG_LEVEL > 1
+ // I think this is a pointless assertion, the code seems to cope
+ // fine with it being empty, no need to crash in a dbglevel=1
+ // build.
OSL_ENSURE(pMgrImpl->aItemList.empty(), "some ConfigItems are still alive");
+#endif
if(!pMgrImpl->aItemList.empty())
{
ConfigItemList::iterator aListIter;