summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:04:08 +0900
committerMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:04:08 +0900
commita8ff3a4fed18d26779375394661a2a9222749960 (patch)
tree72464c5999644b2c43884f59ea5b086e18db3c6f /src
parentf7efe9ca0edfc417f0d0c3631dc0c47c84b22437 (diff)
Invalid iterator not used
Iterator was checked although the item it was pointing to was erased. Now it never happens. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src')
-rw-r--r--src/xrep.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xrep.cpp b/src/xrep.cpp
index 8304f62..d65f21b 100644
--- a/src/xrep.cpp
+++ b/src/xrep.cpp
@@ -226,8 +226,8 @@ int xs::xrep_t::xrecv (msg_t *msg_, int flags_)
pipe->set_identity (identity);
outpipes.erase (it);
outpipe_t outpipe = {pipe, true};
- outpipes.insert (outpipes_t::value_type (identity,
- outpipe));
+ it = outpipes.insert (outpipes_t::value_type (identity,
+ outpipe)).first;
break;
}
++it;