bugfix: do not use invalid iterators while looping thru a container which gets destroyed

This commit is contained in:
Mathias Gumz 2010-05-23 15:58:35 +02:00
parent fbcdd34b22
commit 769130f51a

View file

@ -265,9 +265,8 @@ public:
void leaveAll() { void leaveAll() {
// disconnect all connections // disconnect all connections
for ( Iterator conIt = m_connections.begin(); for ( ; !m_connections.empty(); ) {
conIt != m_connections.end(); ++conIt) { leave(m_connections.begin(), true);
leave(conIt, true);
} }
} }