Fix null deref
Bug: 21857172 willHaveFunctor was assuming that either mStagingDisplayList or mDisplayList would be non-null but this isn't true. Both can be null in some scenarios (notably after a trimMemory) Change-Id: Ia2915b84cfc907ec9c7cbec54ed6dc26283ec998
This commit is contained in:
@@ -241,8 +241,12 @@ void RenderNode::prepareTreeImpl(TreeInfo& info, bool functorsNeedLayer) {
|
||||
animatorDirtyMask = mAnimatorManager.animate(info);
|
||||
}
|
||||
|
||||
bool willHaveFunctor = info.mode == TreeInfo::MODE_FULL && mStagingDisplayListData
|
||||
? !mStagingDisplayListData->functors.isEmpty() : !mDisplayListData->functors.isEmpty();
|
||||
bool willHaveFunctor = false;
|
||||
if (info.mode == TreeInfo::MODE_FULL && mStagingDisplayListData) {
|
||||
willHaveFunctor = !mStagingDisplayListData->functors.isEmpty();
|
||||
} else if (mDisplayListData) {
|
||||
willHaveFunctor = !mDisplayListData->functors.isEmpty();
|
||||
}
|
||||
bool childFunctorsNeedLayer = mProperties.prepareForFunctorPresence(
|
||||
willHaveFunctor, functorsNeedLayer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user