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() {
|
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue