mirror of
https://github.com/openharmony/js_worker_module.git
synced 2026-07-20 22:41:04 -04:00
BugFix loop maybe nullprt when start worker loop
issue: https://gitee.com/openharmony/js_worker_module/issues/I5EDWB Signed-off-by: wangzhaoyong <wangzhaoyong@huawei.com> Change-Id: Ibeddb05e52c6c9bee727509fbd94d2c8a39e94cf
This commit is contained in:
+5
-1
@@ -365,7 +365,11 @@ public:
|
|||||||
void Loop()
|
void Loop()
|
||||||
{
|
{
|
||||||
uv_loop_t* loop = GetWorkerLoop();
|
uv_loop_t* loop = GetWorkerLoop();
|
||||||
uv_run(loop, UV_RUN_DEFAULT);
|
if (loop != nullptr) {
|
||||||
|
uv_run(loop, UV_RUN_DEFAULT);
|
||||||
|
} else {
|
||||||
|
HILOG_ERROR("worker:: Worker loop is nullptr when start worker loop");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user