bugfix: do not use invalid iterators while looping thru a container which gets destroyed
This commit is contained in:
parent
fbcdd34b22
commit
769130f51a
1 changed files with 2 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue