diff --git a/src/threadpool.c b/src/threadpool.c index 2cb0d95bd1fe3df0c59176f9352fa86c53fc2861..53ba6abbb5d730c9fcc14c8a2e5bd53c68d7c6f8 100644 --- a/src/threadpool.c +++ b/src/threadpool.c @@ -717,6 +717,11 @@ static void uv__queue_work(struct uv__work* w) { static void uv__queue_done(struct uv__work* w, int err) { uv_work_t* req; + if (w == NULL) { + UV_LOGE("uv_work_t is NULL"); + return; + } + req = container_of(w, uv_work_t, work_req); uv__req_unregister(req->loop, req);