!12578 修复交互优先DrawableCache GetID 空指针crash

Merge pull request !12578 from 邢暠/FixGetIDNullPointerCrash
This commit is contained in:
openharmony_ci 2024-07-03 15:08:11 +00:00 committed by Gitee
commit 2ee1eb9326
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -272,12 +272,17 @@ void RSSubThread::DrawableCache(DrawableV2::RSSurfaceRenderNodeDrawable* nodeDra
nodeDrawable->SetCacheSurfaceProcessedStatus(CacheProcessStatus::DONE);
nodeDrawable->SetCacheSurfaceNeedUpdated(true);
RSSubThreadManager::Instance()->NodeTaskNotify(param->GetId());
if (!param) {
RS_LOGE("RSSubThread::DrawableCache param is null");
return;
}
NodeId nodeId = param->GetId();
RSSubThreadManager::Instance()->NodeTaskNotify(nodeId);
RSMainThread::Instance()->RequestNextVSync("subthread");
// mark nodedrawable can release
RSUifirstManager::Instance().AddProcessDoneNode(param->GetId());
RSUifirstManager::Instance().AddProcessDoneNode(nodeId);
doingCacheProcessNum--;
}