diff --git a/src/decoder.hpp b/src/decoder.hpp index ec5410f0..814c3197 100644 --- a/src/decoder.hpp +++ b/src/decoder.hpp @@ -148,6 +148,10 @@ namespace zmq // False is returned if the decoder has encountered an error. bool stalled () { + // Check whether there was decoding error. + if (unlikely (static_cast (this)->next == NULL)) + return false; + while (!to_read) { if (!(static_cast (this)->*next) ()) { if (unlikely (!(static_cast (this)->next)))