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

Commit 10e046f

Browse files
win80540YorkShen
authored andcommitted
[weex_core] fix guess crash point (#1856)
Fix following crash > signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 57286b7f r0 89a8e0c0 r1 ff86f5ec r2 89a8e0c0 r3 57286b63 r4 89a8e0c0 r5 12e23560 r6 c3298dcc r7 6fba3af4 r8 147c9780 r9 eb505400 10 00000000 fp 00000000 ip a6af6dbc sp ff86f5c8 lr a6a5ec5f pc a6a1d4ec cpsr 800f0030 #00 pc 0x7d4ec libweexcore.so (_ZN8WeexCore16WXCoreLayoutNode30getLayoutDirectionFromPathNodeEv+5) #1 pc 0xbec5b libweexcore.so #2 pc 0xb751ed base.odex
1 parent fe6f8c9 commit 10e046f

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

weex_core/Source/core/layout/layout.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,13 +1120,16 @@ namespace WeexCore {
11201120

11211121
WXCoreDirection WXCoreLayoutNode::getLayoutDirectionFromPathNode() {
11221122
WXCoreLayoutNode *node = this;
1123-
if (node->getLayoutDirection() != kDirectionInherit) return node->getLayoutDirection();
1124-
if (node->getDirection() != kDirectionInherit) {
1125-
node->mLayoutResult->mLayoutDirection = node->getDirection();
1126-
return node->getLayoutDirection();
1127-
} else if (nullptr != node->mParent) {
1128-
node->mLayoutResult->mLayoutDirection = node->mParent->getLayoutDirectionFromPathNode();
1129-
return node->getLayoutDirection();
1123+
if (nullptr != node) {
1124+
if (node->getLayoutDirection() != kDirectionInherit)
1125+
return node->getLayoutDirection();
1126+
if (node->getDirection() != kDirectionInherit) {
1127+
node->mLayoutResult->mLayoutDirection = node->getDirection();
1128+
return node->getLayoutDirection();
1129+
} else if (nullptr != node->mParent) {
1130+
node->mLayoutResult->mLayoutDirection = node->mParent->getLayoutDirectionFromPathNode();
1131+
return node->getLayoutDirection();
1132+
}
11301133
}
11311134
return WEEXCORE_CSS_DEFAULT_DIRECTION;
11321135
}

0 commit comments

Comments
 (0)