diff --git a/src/threadpool.c b/src/threadpool.c index 9d13120fdd3799c58f831cdb98c72c1b931672a0..7f3d72b8268dd34eed9d794266f54bf0e8254740 100644 --- a/src/threadpool.c +++ b/src/threadpool.c @@ -590,6 +590,10 @@ static void uv__queue_done(struct uv__work* w, int err) { void uv__ffrt_work(ffrt_executor_task_t* data, ffrt_qos_t qos) { struct uv__work* w = (struct uv__work *)data; + if (w == NULL || w->work == NULL) { + UV_LOGE("uv work is invalid"); + return; + } w->work(w, (int)qos); }