bugfix: do not use invalid iterators while looping thru a container which gets destroyed
Mathias Gumz akira at fluxbox dot org
1 files changed,
2 insertions(+),
3 deletions(-)
jump to
M
src/FbTk/Signal.hh
→
src/FbTk/Signal.hh
@@ -265,9 +265,8 @@
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); } }