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,7 +243,9 @@ bool DrawFrameTask::syncFrameState(TreeInfo& info) {
mContext->unpinImages();
for (size_t i = 0; i < mLayers.size(); i++) {
mLayers[i]->apply();
if (mLayers[i]) {
mLayers[i]->apply();
}
}
mLayers.clear();
mContext->setContentDrawBounds(mContentDrawBounds);