diff --git a/async.c b/async.c index 8b50de2..5acd01c 100644 --- a/async.c +++ b/async.c @@ -142,6 +142,9 @@ static redisAsyncContext *redisAsyncInitialize(redisContext *c) { /* We want the error field to be accessible directly instead of requiring * an indirection to the redisContext struct. */ static void __redisAsyncCopyError(redisAsyncContext *ac) { + if (!ac) + return; + redisContext *c = &(ac->c); ac->err = c->err; ac->errstr = c->errstr;