From 67eeeb0b1084a72f2eca296235f732bb8d1d472c Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 6 Mar 2018 13:03:48 +0100 Subject: [PATCH] Streams: fix XREAD missing check for NULL object. --- src/t_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_stream.c b/src/t_stream.c index e2908d2c..3b7d022a 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -1171,7 +1171,7 @@ void xreadCommand(client *c) { if (strcmp(c->argv[i]->ptr,"$") == 0) { o = lookupKeyRead(c->db,key); - if (checkType(c,o,OBJ_STREAM)) goto cleanup; + if (o && checkType(c,o,OBJ_STREAM)) goto cleanup; if (o) { stream *s = o->ptr; ids[id_idx] = s->last_id;