diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2010-05-23 13:58:35 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2010-05-23 13:58:35 (GMT) |
commit | 769130f51a8f670ba46dac50d7602f6b936c9dc1 (patch) | |
tree | 951917712a177cf55c726dc3a388d305ed89c1f2 | |
parent | fbcdd34b223174a28ff712b7d03e56339fa2fe07 (diff) | |
download | fluxbox-769130f51a8f670ba46dac50d7602f6b936c9dc1.zip fluxbox-769130f51a8f670ba46dac50d7602f6b936c9dc1.tar.bz2 |
bugfix: do not use invalid iterators while looping thru a container which gets destroyed
-rw-r--r-- | src/FbTk/Signal.hh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/FbTk/Signal.hh b/src/FbTk/Signal.hh index 702f05e..b70c501 100644 --- a/src/FbTk/Signal.hh +++ b/src/FbTk/Signal.hh | |||
@@ -265,9 +265,8 @@ public: | |||
265 | 265 | ||
266 | void leaveAll() { | 266 | void leaveAll() { |
267 | // disconnect all connections | 267 | // disconnect all connections |
268 | for ( Iterator conIt = m_connections.begin(); | 268 | for ( ; !m_connections.empty(); ) { |
269 | conIt != m_connections.end(); ++conIt) { | 269 | leave(m_connections.begin(), true); |
270 | leave(conIt, true); | ||
271 | } | 270 | } |
272 | } | 271 | } |
273 | 272 | ||