mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-09 15:26:04 +00:00
Merge pull request #476 from hurtonm/master
Check decoder's state function for NULL before calling it
This commit is contained in:
commit
a28322cd0c
@ -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 <T*> (this)->next == NULL))
|
||||
return false;
|
||||
|
||||
while (!to_read) {
|
||||
if (!(static_cast <T*> (this)->*next) ()) {
|
||||
if (unlikely (!(static_cast <T*> (this)->next)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user