summaryrefslogtreecommitdiff
path: root/forms/source/misc/InterfaceContainer.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2006-12-01 15:55:25 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2006-12-01 15:55:25 +0000
commit767b7f9a8545b35b42975a5652beb44122a318a7 (patch)
tree63c2295a1587641050607bc5b6a5939da486720c /forms/source/misc/InterfaceContainer.cxx
parent3d4bc8601f33e90d612a858393f8cd207d49dbb1 (diff)
INTEGRATION: CWS dba22a (1.26.4); FILE MERGED
2006/11/15 08:33:00 fs 1.26.4.2: #i71216# disposing: properly look up the object in m_aMap 2006/11/13 09:10:25 fs 1.26.4.1: #i71216# disposing: don't crash if m_aItems and m_aMap became incnsistent (but assert only)
Diffstat (limited to 'forms/source/misc/InterfaceContainer.cxx')
-rw-r--r--forms/source/misc/InterfaceContainer.cxx17
1 files changed, 11 insertions, 6 deletions
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index 94a2819eb..7ffad1a7a 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: InterfaceContainer.cxx,v $
*
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: obo $ $Date: 2006-10-12 11:14:25 $
+ * last change: $Author: rt $ $Date: 2006-12-01 16:55:25 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -564,21 +564,26 @@ void SAL_CALL OInterfaceContainer::disposing(const EventObject& _rSource) throw(
if ( m_aItems.end() != j )
{
+ m_aItems.erase(j);
+
+ // look up in, and erase from, m_aMap, too
OInterfaceMap::iterator i = m_aMap.begin();
while ( i != m_aMap.end() )
{
DBG_ASSERT( i->second.get() == Reference< XInterface >( i->second, UNO_QUERY ).get(),
"OInterfaceContainer::disposing: map element not normalized!" );
- if ( i->second.get() == _rSource.Source.get() )
+ if ( i->second.get() == xSource.get() )
+ {
// found it
+ m_aMap.erase(i);
break;
+ }
++i;
- }
- m_aMap.erase(i);
- m_aItems.erase(j);
+ DBG_ASSERT( i != m_aMap.end(), "OInterfaceContainer::disposing: inconsistency: the element was in m_aItems, but not in m_aMap!" );
+ }
}
}