This repository was archived by the owner on Jun 3, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
weex_core/Source/core/layout Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -1120,13 +1120,16 @@ namespace WeexCore {
1120
1120
1121
1121
WXCoreDirection WXCoreLayoutNode::getLayoutDirectionFromPathNode () {
1122
1122
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
+ }
1130
1133
}
1131
1134
return WEEXCORE_CSS_DEFAULT_DIRECTION;
1132
1135
}
You can’t perform that action at this time.
0 commit comments