diff --git a/framework/ios/base/executors/HippyJSEnginesMapper.mm b/framework/ios/base/executors/HippyJSEnginesMapper.mm index 8e3fdd622f1..757c3c9a8c5 100644 --- a/framework/ios/base/executors/HippyJSEnginesMapper.mm +++ b/framework/ios/base/executors/HippyJSEnginesMapper.mm @@ -62,8 +62,9 @@ EngineResource::~EngineResource() { auto runner = engine_->GetJsTaskRunner(); if (footstone::Worker::IsTaskRunning() && runner == footstone::runner::TaskRunner::GetCurrentTaskRunner()) { + __block auto dom_worder = dom_worker_; dispatch_async(dispatch_get_main_queue(), ^{ - dom_worker_->Terminate(); + dom_worder->Terminate(); }); } else { dom_worker_->Terminate();