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() {
// disconnect all connections
for ( Iterator conIt = m_connections.begin();
conIt != m_connections.end(); ++conIt) {
leave(conIt, true);
for ( ; !m_connections.empty(); ) {
leave(m_connections.begin(), true);
}
}