Merge "Add null pointer check to avoid system crash."

This commit is contained in:
Treehugger Robot
2022-09-28 22:58:42 +00:00
committed by Gerrit Code Review

View File

@@ -243,8 +243,10 @@ bool DrawFrameTask::syncFrameState(TreeInfo& info) {
mContext->unpinImages(); mContext->unpinImages();
for (size_t i = 0; i < mLayers.size(); i++) { for (size_t i = 0; i < mLayers.size(); i++) {
if (mLayers[i]) {
mLayers[i]->apply(); mLayers[i]->apply();
} }
}
mLayers.clear(); mLayers.clear();
mContext->setContentDrawBounds(mContentDrawBounds); mContext->setContentDrawBounds(mContentDrawBounds);
mContext->prepareTree(info, mFrameInfo, mSyncQueued, mTargetNode); mContext->prepareTree(info, mFrameInfo, mSyncQueued, mTargetNode);