Repository: incubator-weex
Updated Branches:
  refs/heads/master b7c069340 -> 88670072a


[WEEX-362] [iOS] tmp solution if mLayoutResult is nil (mutil thread ?)

close #1174


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/88670072
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/88670072
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/88670072

Branch: refs/heads/master
Commit: 88670072a0b472bc8cac2e99f778584933b8ee13
Parents: b7c0693
Author: zhongcang <qh438406...@gmail.com>
Authored: Mon May 14 21:38:34 2018 +0800
Committer: acton393 <zhangxing610...@gmail.com>
Committed: Mon May 14 21:57:17 2018 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Layout/WXCoreLayout.h | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/88670072/ios/sdk/WeexSDK/Sources/Layout/WXCoreLayout.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Layout/WXCoreLayout.h 
b/ios/sdk/WeexSDK/Sources/Layout/WXCoreLayout.h
index 522bc8c..fac9c4f 100644
--- a/ios/sdk/WeexSDK/Sources/Layout/WXCoreLayout.h
+++ b/ios/sdk/WeexSDK/Sources/Layout/WXCoreLayout.h
@@ -257,6 +257,10 @@ namespace WeexCore {
 
     inline void reset() {
       if (isDirty()) {
+        //todo tmp solution if mLayoutResult is nil (mutil thread ?)
+        if (nullptr == mLayoutResult) {
+            mLayoutResult = new WXCorelayoutResult();
+        }
         mLayoutResult->reset();
         for (WXCoreFlexLine *flexLine : mFlexLines) {
           if (flexLine != nullptr) {

Reply via email to