Streams: fix XREAD missing check for NULL object.

This commit is contained in:
antirez 2018-03-06 13:03:48 +01:00
parent 8d8755c7b5
commit 67eeeb0b10

View File

@ -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;