From 8772d4025877eaa375e2dfc327f76fe57a1f530b Mon Sep 17 00:00:00 2001 From: wqyfavor Date: Mon, 13 May 2019 12:29:59 +0800 Subject: [PATCH] [Core] Protect potential crash. (#2430) --- weex_core/Source/core/layout/layout.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weex_core/Source/core/layout/layout.cpp b/weex_core/Source/core/layout/layout.cpp index aeab1e9d18..f43d5f2103 100644 --- a/weex_core/Source/core/layout/layout.cpp +++ b/weex_core/Source/core/layout/layout.cpp @@ -1129,6 +1129,9 @@ namespace WeexCore { if (child == nullptr) { continue; } + if (child->mLayoutResult == nullptr || child->mCssStyle == nullptr) { + continue; + } // determin direction if (child->mLayoutResult->mLayoutDirection == kDirectionInherit) { if(child->mCssStyle->mDirection == kDirectionInherit) {