Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

Commit f04b977

Browse files
author
wqyfavor
committed
Fix potential crash of layout node.
1 parent be06e3a commit f04b977

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

weex_core/Source/core/layout/layout.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,9 @@ namespace WeexCore {
11051105
void WXCoreLayoutNode::determineChildLayoutDirection(const WXCoreDirection direction) {
11061106
for (Index i = 0; i < getChildCount(kBFC); ++i) {
11071107
WXCoreLayoutNode *child = getChildAt(kBFC, i);
1108+
if (child == nullptr) {
1109+
continue;
1110+
}
11081111
// determin direction
11091112
if (child->mLayoutResult->mLayoutDirection == kDirectionInherit) {
11101113
if(child->mCssStyle->mDirection == kDirectionInherit) {

0 commit comments

Comments
 (0)