diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp index 59c914f0198c..03f02de98efe 100644 --- a/libs/hwui/renderthread/DrawFrameTask.cpp +++ b/libs/hwui/renderthread/DrawFrameTask.cpp @@ -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);