Add a test for swap being non-NULL before attempting to call swap->empty () in
zmq::writer_t::process_activate_writer ().
---
src/pipe.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/pipe.cpp b/src/pipe.cpp
index 0108d56..db8fb0b 100644
--- a/src/pipe.cpp
+++ b/src/pipe.cpp
@@ -313,7 +313,7 @@ void zmq::writer_t::process_activate_writer (uint64_t
msgs_read_)
// There are no more messages in the swap. We can switch into
// standard in-memory mode.
- if (swap->empty ()) {
+ if (swapping && swap->empty ()) {
swapping = false;
// Push delimiter into the pipe. Trick the compiler to belive that
--
1.7.1
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev